here is my script
local button = script.Parent
local tp = game.GetService("TeleportService")
local place2 = 4818533596
local player = game.Players.LocalPlayer
if button.MouseButton1Click then
tp:Teleport(place2,player)
end
here is my script
local button = script.Parent
local tp = game.GetService("TeleportService")
local place2 = 4818533596
local player = game.Players.LocalPlayer
if button.MouseButton1Click then
tp:Teleport(place2,player)
end
You can't just use "if button.MouseButton1Click then". You must activate it, use this below and every time you click the button it'll run a function and then teleport the player!
button.MouseButton1Click:Connect(function()
tp:Teleport(place2,player)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Is it a LocalScript?
yes