I tried to make a script that kills the player when he joined (because there's a spawn bug) but I don't know how. Can you please help me?
First your going to want to use a PlayerAdded event
game.Players.PlayerAdded:connect(function(player) --Code Goes here end)
Then your going to want to kill the player, the way you can do this is by waiting for the characater then getting the humanoid and setting the health to zero and removing the forcefield.
game.Players.PlayerAdded:connect(function(player) --Waits for player player.CharacterAdded:connect(function(char) --Waits for character wait() --Waits so they can kill char:WaitForChild("ForceField"):Destroy() --Destroys ForceField char:WaitForChild("Humanoid").Health=0 --Sets Health to zero end) end)
That should work
I suggest this being a Server Script:
game:GetService("Players").PlayerAdded:Connect(function(plr) local character = plr.CharacterAdded:Wait() character:WaitForChild("ForceField"):Destroy() character:WaitForChild("Humanoid").Health = 0 end)
Hope this works!