Please Explain How To make This Script...
✓ ANSWER ACCEPTED
How To Make A Teleport Script?
2 answers
✓ Accepted answer
first you would insert a brick and then insert a script into that brick. Once done you would need to create an ontouched function that changes your character torso cframe to your new desired cframe here is an exmaple.
brick = script.Parent --this is just the scripts parent which would be the Part you inserted.
player = game.Players.LocalPlayer --put this inside of a local script
brick.Touched:connect(function()
player.Character.Torso.CFrame = CFrame.new(10,0,0)
end)
function onTouch(part) --This is the function you got to use
local p = part.Parent:FindFirstChild("Humanoid") --Finds theplayer and save's it as a tag to later use
if p then --Checks if the part that we tagged is ingame
p.CFrame = CFrame.new(1,1,1) --Teleports it to that postition, you can change the position
end
end
script.Parent.Touched:connect(onTouch) --Connects it and makes it work
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Humanoid's don't have a CFrame property.