I’m trying to make it so when they click a gui they rejoin, I had a script for it but for some reason it didn’t work. Below is the script I used. The script is inside a button. If you could send me a script like that, that would help a lot, thanks.
script.Parent.MouseButton1Click:Connect(function(player)
game:GetService("TeleportService"):Teleport(000, player) -- place id.
end)
local player = game.Players:FindFirstChildOfClass("Player")
script.Parent.MouseButton1Click:Connect(function()
game:GetService("TeleportService"):Teleport(000, player) -- place id.
end)
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
game:GetService("TeleportService"):Teleport(000, player) -- place id.
end)
This is how you would do it for a local script. This works in multiple player servers too!