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

Why doesn't this teleport the player?

Asked by 10 years ago
function onClicked(plr)
    if plr.PlayerGui.Value.Value == 4 then
    plr.PlayerGui.Value.Value = 0
    local D = plr.PlayerGui.DValue
    local F = plr.PlayerGui.FValue
    local G = plr.PlayerGui.GValue
    local H = plr.PlayerGui.HValue
    D.Value = false
    F.Value = false
    G.Value = false
    H.Value = false
        if plr.Character:FindFirstChild("Torso") then
        plr.Character.Torso.CFrame = CFrame.new(script.Parent.TelePosition.Value + Vector3.new(0, 0.5, 0))
            else print'already has'
        end
    end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
  • No output

  • Yes, I have a "TelePosition" inside the brick the player has to click.

2 answers

Log in to vote
1
Answered by 10 years ago

Nvm, this script works perfectly fine, I just had it disabled.......

Ad
Log in to vote
0
Answered by 10 years ago

Try to use MoveTo.

Answer this question