What is wrong with this? I want the localscript to work. What I mean is when you click the gui you teleport to that place. How do you do this?
position = Vector3.new(0,0,0) -- CHANGE THIS TO THE POSITION script.Parent.Button1Click:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(position) end)
That's because the event name for a mouse click in a GUI is MouseButton1Click. Button1Click is the name of the event in the Mouse class.
Well, here is a script I made. It works very well.
function Click() script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(1.908, 8.763, 692.483) --change to your pos end --add three digits to the middle number. (Ex. 8.763 + 3 = 8.766) trust me, do it script.Parent.MouseButton1Down:connect(Click)