I'm making a game and wanted to know how players can kick themselves by pressing 'E to interact', any suggestions?
✓ ANSWER ACCEPTED
How to kick players with Proximity Prompt?
1 answer
✓ Accepted answer
It's not that hard to do, we can just connect the ProximityPrompt's Triggered event that will fire the player that activated the prompt, we would just kick that player using Player:Kick. Let's assume this script is inside the part with the proximity prompt
-- Inside the part that will kick you, needs a proximityprompt
local part = script.Parent
local proximityPrompt = part.ProximityPrompt -- Your proximity prompt
proximityPrompt.Triggered:Connect(function(player) -- When the prompt is triggered
player:Kick("lol don't interact with this part") -- Kick the player
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks!