I wrote this code today but have recently decided I would the player to rejoin the place instead of be kicked.
I do not know how to do this.
Code I wrote for kick on death:
Message = "Table boss has wrecked you." game.Players.PlayerAdded:connect(function(plyr) repeat wait() until plyr.Character ~= nil repeat wait() until plyr.Character:FindFirstChild("Humanoid") ~= nil plyr.Character.Humanoid.Died:connect(function() plyr:Kick(Message) end) end)
If anybody could help it'd be greatly appreciated.
Note: Not sure if it will matter but the place that it needs to rejoin is a place and not a starter-place.
-Nohidas :D
I'm assuming you are trying to rejoin to a place then you can just use game:GetService("TeleportService")
local TeleportService = game:GetService("TeleportService") local placeId = -- your place id here game.Players.PlayerAdded:Connect(function(plyr) repeat wait() until plyr.Character ~= nil repeat wait() until plyr.Character:FindFirstChild("Humanoid") plyr.Character.Humanoid.Died:Connect(function() -- do whatever you want before teleporting the player TeleportService:Teleport(placeId, plyr) end) end)