local if touched h.HP = 0 Children:BreakJoints end
everytime I typed something is incorrect. heres by error code. Expected idenfier, got if.
Can you help me?
local
is used to define a variable and if
is a (conditional) statement... These two should not end up on the same line :)
Also, just from looking at the script you've provided, that would do absolutely nothing. You've not created a function
for touched, and h.HP
does not seem to be defined...
script.Parent.Touched:connect(function(kill) -- Make the script fire when the part is touched h = kill.Parent:FindFirstChild("Humanoid") -- Locate the part of the player with the health (Humanoid) h.Health = h.Health - 110 -- Set the health to zero end)
Bare in mind I've not been able to test this so possibly wont work.
If this has answered your question, please accept the answer with the button on the right. If this does not work please do tell me and if you'd like a better, more in depth explanation then please feel free to ask.