#How do I make a proximity Prompt that kills the player?

19 messages · Page 1 of 1 (latest)

wanton cave
#

When a player activates a proximity prompt, you can get the player from the function which you can then use to set the humanoid health to 0

autumn obsidian
#

how would i go about that?

wanton cave
#

do you know any basics to coding?

autumn obsidian
#

very little

#

i have the function part i think

#

script.Parent.Triggered:Connect(function(partB)
local humanoid = partB.Parent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid:TakeDamage(100)
end
end)

#

thats my whole script

wanton cave
#

refrencing would make it easier, like saying local ProximityPrompt = (refrence it here)

also partb would be the character, partbs parent would be the workspace

tribal sparrow
#

Big man can you help me with my script in a second lol

#

unless you cant

autumn obsidian
#

I actually found the answer

#

so u can help him if u want

#

thx for ur help

wanton cave
#

oh wait nvm

tribal sparrow
#

you dont have too

wanton cave
#

sorry

tribal sparrow
#

oh ok