RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"if a player interacts with a proximity prompt they die"
-- local script local ProximityPromptService = game:GetService("ProximityPromptService") local function onProximityPromptTriggered(player) local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end end end local proximityPrompt = script.Parent:FindFirstChild("ProximityPrompt") if proximityPrompt then proximityPrompt.Triggered:Connect(onProximityPromptTriggered) end