Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

best way to remove the player as soon as they join?

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)

1 comment

0

Maybe just try replacing Players.PlayerAdded with player.CharacterAdded

1 answer

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.

1 comment

0

i mean more like the camera still exists but the actual palyer just commits not alive

This discussion is preserved as it was. New answers, comments, and votes are closed.