Hi there,
I’m trying to kick a player server-sided when a RemoteEvent (“FileRemoved”) is fired. How would I achieve this? The code below does not seem to work.
game.ReplicatedStorage.FileRemoved.OnServerEvent:Connect(function(player)
-- function will be called whenever the player fires the event
player:Kick()
end)
If you’re using this for an anti-exploit, I’d like to add that this can be easily bypassed
Instead of having a player parameter in the first line put it on the second one, so it grabs the info from the remote event. (remote events require the plr parameter on the server side)