I trying to make a main menu for my game but I can't find a way to teleport the player to the main game from the main menu, can anyone help?
Follow the Steps Below:
- First Create a Ui Button
- Create a Script on Client Context
- Now Inside the Script, Put this Script
- Create a Target Object [On this Object, we will be Teleporting the Player, It can be a Cube or anything you want and turn visibility force off ]
local yourButton = theButton local player = Game.GetLocalPlayer() local target = yourTargetObject yourButton.clickedEvent:Connect(function() player:SetWorldPosition(Target:GetWorldPosition()) end)
Hope it Helps and If you want any Further Help, then Let Me Know!
Thanks for the help.