Executed input problems

I’m having trouble with this when a certain code won’t execute at all, it I’ve tried to fix all my mistakes the code is correct and I can’t exactly see why it wont execute the line
I’ve tried debugging the problem, it’s not a problem with the line itself I believe, need some help on this.

20210828_215403

1 Like

^ where the code at? you should at least paste the code somewhere here so that we could try to fix it for you.

I doubt this is Pixel Worlds Forums related, if so, what do you mean code? Are you injecting a DLL and got your c++ code wrong? I’m confused on what you’re on about and if you are on about “code” why would this be related to Pixel Worlds.

Either way, I doubt this is the forums to ask for this, they’re many other forums which can help you a lot more than most of the people here.

I can help, it looks like you could too, we just need the c o d e

1 Like

Was just making a teleport script for a project anyway heres the code (its in lua)

local TeleportService = game:GetService (“TeleportService”)

local Place = 000000000

script.Parent.Touched:connect (function (hit)

local player = game.Players:GetPlayerFromCharacter (hit)

if player then

TeleportService:Teleport (Place , Player)

end

end)

This is the problem, the hit isn’t a character, it’s a body part of a character, you need to use .Parent to get the parent of the part, which is the character.

Change it to

local player = game.Players:GetPlayerFromCharacter (hit.Parent)

Edit: Also, you should mention the game engine too, the next time you ask someone for help, unless you ask on a forum purely dedicated to that (roblox devforum, for example). I know that it’s roblox studio, but others won’t.

Edit2: Also, if you wan’t the player teleport on the current place, you just change player’s position, the TeleportService is used only for place to place teleport.

nothing wrong asking it here as there may be programmers here to help out.

By the way, you can’t teleport in roblox studio, so you will have to publish the game and check it there.

Yet I assume there is a lot better help in a Roblox forum and Roblox groups.

Yoooo, thanks i got it working thanks for the help.