How can I damage my self if i pull out a item?
COMMUNITY QUESTION
How can I damage my self if i pull out a item?
2 answers
Hi i might of found something. Here is a devforum post about them having a bug where when they hold out a tool it damages them. Look at reply 2 where it shows a screenshot of his code this may help you. Devforum Hope this helps!!
Use the .Equipped event and connect it to a function that damages the player. When a tool is equipped, its parent is always going to be the player's character, so you can form a reference that way. Here's an example:
local tool = script.Parent
tool.Equipped:Connect(function()
tool.Parent.Humanoid:TakeDamage(100) -- change to your damage
end)
1 comment
0
thanks
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks