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

How to kick players with Proximity Prompt?

I'm making a game and wanted to know how players can kick themselves by pressing 'E to interact', any suggestions?

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)

1 comment

0

Thanks!

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