Why does it teleport before the player has clicked the button?
local TeleportService = game:GetService("TeleportService") local placeID_1 = 3792830514 local player = game.Players.LocalPlayer local function OnClick(Val) print(Val) TeleportService:Teleport(placeID_1, player) end script.Parent.Activated:Connect(OnClick("Clicked"))
Maybe try this?
local TeleportService = game:GetService("TeleportService") local placeId = 0 -- replace here -- teleport the user script.Parent.Activated:Connect(function() TeleportService:Teleport(placeId) end)
This should work, mark this as the answer if it worked!