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

Why is it not kicking the Player?

I'm trying to kick the player when they touch a block

local kickRE = game:GetService("ReplicatedStorage"):FindFirstChild("KickPlayer") -- Remote Event to kick players
local Players = game:GetService("Players") -- Defining Players

kickRE.OnClientEvent:Connect(function()

	Players:Kick() -- Kicking the Player

end)

Can anyone tell me why it isn't kicking the Player please?

2 comments

0

hey, can you tell me if the script is a local script or a server script?

0

Tis' a LocalScript

1 answer

✓ Accepted answer

Since this is a local script, you just have to put the script in StarterPack or somewhere local.

Then do (on line 6):

Players.LocalPlayer:Kick() -- Kicking the Player

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