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
01function onClicked(plr)
02    if plr.PlayerGui.Value.Value == 4 then
03    plr.PlayerGui.Value.Value = 0
04    local D = plr.PlayerGui.DValue
05    local F = plr.PlayerGui.FValue
06    local G = plr.PlayerGui.GValue
07    local H = plr.PlayerGui.HValue
08    D.Value = false
09    F.Value = false
10    G.Value = false
11    H.Value = false
12        if plr.Character:FindFirstChild("Torso") then
13        plr.Character.Torso.CFrame = CFrame.new(script.Parent.TelePosition.Value + Vector3.new(0, 0.5, 0))
14            else print'already has'
15        end
16    end
17end
18 
19script.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