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

Teleport Gui not working?

Asked by 9 years ago

I have a Teleport Gui, but It isn't working. I think the reason is that I didn't locate the Gui correctly in the Lighting but I'm not 100% sure. Please help!

function Click()
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(0,0,0)
end

script.Parent.MouseButton1Down:connect(Click)

1 answer

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

You didn't locate the GUI in Lighting? Puzzled... If it is in Lighting, have a script Parent it to their PlayerGui. Make it a local script and:

script.Parent.MouseButton1Down:connect(function()
    game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(0,0,0)
end)
Ad

Answer this question