of     1   

puppydogj10
#140444792Tuesday, July 15, 2014 9:10 PM GMT

Hi guys! So I am making an obby. Currently though... I can't ge the code for my lava brick to work. Please help! What is the exact code for killing damage in this? I will put your name in the description!
CTServant001
#140445010Tuesday, July 15, 2014 9:12 PM GMT

script.Parent.Touched:connect(function(otherPart) if otherPart.Parent:FindFirstChild('Humanoid') then otherPart.Parent:FindFirstChild('Humanoid'):TakeDamage(100) end end)
puppydogj10
#140445048Tuesday, July 15, 2014 9:12 PM GMT

THANKS!
UndeleteTool
#140445140Tuesday, July 15, 2014 9:13 PM GMT

Put the code I'm about to give you, inside a script in the lava brick: script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then humanoid:TakeDamage(10) end end) --if you would like the brick to instantly kill, replace 10 with 100 or however much maximum health your player would normally have Hope this helps, good luck!
puppydogj10
#140445232Tuesday, July 15, 2014 9:14 PM GMT

YAY!!! IT WORKS THANKS A TON!!!!!!!!!!!!!!!!!!!!
UndeleteTool
#140445246Tuesday, July 15, 2014 9:15 PM GMT

woops, I made a slight mistakey: script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.humanoid:TakeDamage(10) end end) aww i got in late, well done to the guy who got there first
CTServant001
#140445259Tuesday, July 15, 2014 9:15 PM GMT

@undeleteTool, you forgot to define humanoid on line 3
puppydogj10
#140445287Tuesday, July 15, 2014 9:15 PM GMT

Sorry Undelete that was to CT. SOrry he responded first. I am going to put his name in the description. SOrry!
UndeleteTool
#140445701Tuesday, July 15, 2014 9:19 PM GMT

no worries man, hope your obby works out :)!

    of     1