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

If you click 1 on a GUI It teleports you to Level 1?

I'm having trouble with something.

I have made a GUI with numbers 1-9 on it, But I need it so when you click 1 It teleports you to level one, When you Click 2 It teleports you to level , So on and so on.

If you can help me it'd be greatly appreciated! Thanksss!

3 comments

1

This is a request, not allowed on this website. You must try it first!

3

What do you mean by "GUI with numbers 1-9"? Want to make sure you actually did make 1-9 buttons before answering.

1

Did, Dont worry xd @tiraner

1 answer

✓ Accepted answer
-- In a local script
player = game.Players.LocalPlayer
button = script.Parent
newplace = CFrame.new(0, 0, 0) -- where to teleport to
function Clicked()
    if player.Character then
        player.Character.Torso.Anchored = true
        wait()
        player.Character.Torso.CFrame = newplace
        wait()
        player.Character.Torso.Anchored = false
    end
end
button.MouseButton1Click:connect(Clicked)

Put this in a Gui textbutton for each level

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