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

How do I make a Teleport GUI that isn't based off of an object?

So, I wanted to make a Teleport GUI that isn't based off of an object

What I mean by "based" is that when you touch that object, you get teleported to the coordinates that you placed in the script, or when you click a button on the GUI, it teleports you to an object.

What if I just want the button to be pressed, and you're just teleported to the coordinates?

1 comment

0

Part.CFrame = CFrame.new(1,1,1)

1 answer

local script, when you click the button it will fire an event

event=game:GetService("ReplicatedStorage"):WaitForChild("GuiTeleport")
textbutton.MouseButton1Click:connect(function()

event:FireServer()

end)

server script when the event is fired, it teleports the player to the coordinates

event=Instance.new("RemoteEvent")
event.Name="GuiTeleport"
event.Parent=game:GetService("ReplicatedStorage")
event.OnServerEvent:connect(function(player)

	player.Character.HumanoidRootPart.CFrame=CFrame.new(PUT YOUR CORDINATES HERE)

end)

4 comments

0

Let me know if you have any questions

0

In the first script, there's an issue with the "textbutton". I placed a LocalScript inside the ScreenGui with both scripts.

0

there should be: local textbutton = script.parent

0

If the script is inside the text button. If it isn't: local textbutton = game.StarterGui.ScreenGui.TEXTBUTTONNAME

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