Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need help with my teleport to coordinates gui button?

could someone please tell me what i did wrong here? i got annoyed by the teleport to brick so im trying to do teleport to the coordinates could somone tell me what i did wrong

wait(1)
player = game.Players.LocalPlayer
button = script.Parent



function teleportIsland()
	CFrame = Cframe.newVector3(-412.5, 887.5, 2974)
end

button.MouseButton1Click:connect (teleportIsland)

1 comment

0

i had to add the question mark in the question

1 answer

✓ Accepted answer

You haven't defined the Character and his Target Location. This is the full script that you need in your GUI Button:

wait(1)
player = game.Players.LocalPlayer --This is your defined player.
character= player.Character --This is your character
button = script.Parent -- Button

function teleportIsland()
    character.Torso.CFrame = CFrame.new(-412.5, 887.5, 2974) --Target Location
end

button.MouseButton1Click:connect (teleportIsland)

I'm not that great in explaining but that will do.

1 comment

0

thx and no need for the explanation i get it

This discussion is preserved as it was. New answers, comments, and votes are closed.