i have tried using a script that closes the script but makes you teleport to the place
1 | function onClicked() |
2 | script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(- 1052 , 752 , 701.4 ) |
3 | end |
4 | script.Parent.MouseButton 1 Down:connect(onClicked) |
5 | local Frame = script.Parent.Parent |
6 | function onClick() |
7 | Frame.Visible = false |
8 | end |
script.Parent.MouseButton1Click:connect(onClick) '
didnt work...
I'm assuming this is a ScreenGui? If so you could use LocalPlayer and it would be a lot easier.
1 | script.Parent.MouseButton 1 Down:connect( function () |
2 | local plr = game.Players.LocalPlayer |
3 | local frame = script.Parent.Parent |
4 | plr.Character:MoveTo(Vector 3. new(- 1052 , 752 , 701.4 ) |
5 | frame.Visible = false |
6 | end |
Comment if it didn't work.