no clue why this doesnt work, its in a localscript
local Players = game:GetService("Players") local player = game.Players.LocalPlayer Players.PlayerAdded:connect(function() player.Humanoid:Destroy() end)
you can use the :Kick(")
function to kick someone when they join a game like this:
game.Players.PlayerAdded:Connect(function(player) player:Kick("ahahhaha") -- you can put any message in the parameters end)
this would only work in server scripts in workspace or serverscriptservice, since PlayerAdded
only runs in the server so thats why ur script wont work. you can also use the parameter in PlayerAdded
to get the player instead of using localplayer
which only can be accessed in local scripts.
destroying the humanoid of the player wont remove the player, but just break the character.