Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Teleporter script isn't working for me, can someone tell me why it is not working properly?

Asked by 3 years ago
Edited 3 years ago

I'm trying to make a teleporter which I know how to make but for some reason this script isn't working. If you can help me that'd be awesome, thanks!

to = game.Workspace.MiniGame2.To
reset = false

script.Parent.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    if reset == false then
        reset = true
        hit.Parent.HumanoidRootPart.Position = to.Position
        wait(1)
        reset = false
    end
end)

2 answers

Log in to vote
0
Answered by
ovicaI 7
3 years ago

Try changing Position to CFrame? (I'm new so dont expect this to work)

0
Doesn't work, still thanks for trying to help Nitrolux200 62 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

I found the correction myself by experimenting random things. I apparently needed to just anchor both parts and then it worked for some reason, lol.

Answer this question