Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I Am Trying To Make A Teleporter Script But I Cant Figure It Out?

Here is the script i am using and its not working (im trying to teleport between parts when touched)

script.Parent.Touched:Connect(function(h)

local hum = h.Parent:FindFirstChild("Humanoid")

if hum ~= nil then

h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace["Teleporter"].Position

end

end)

I named one of the parts "Teleporter"

2 comments

0

I've tested your code and it seems to work. Is your script a server script or a local script?

0

Didn't you forgot to close the bracket? Check what the output says, always helpful.

1 answer

✓ Accepted answer

Try dis

script.Parent.Touched:Connect(function(h)

local hum = h.Parent:FindFirstChild("Humanoid")

if hum ~= nil then

h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace["Teleporter"].Position)

end

end)

It was because u forgot to close the parenthesis

This discussion is preserved as it was. New answers, comments, and votes are closed.