Hello again
When my particle "Steam" is enabled then the player should take damage.
The player does not take any damage for some reason, what is wrong?
script 1:
while true do
script.Parent.Steam.Enabled = true
wait(3)
script.Parent.Steam.Enabled = false
wait(3)
end
script 2:
if script.Parent.Steam.Enabled == true then
script.Parent.Dead.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.Health = humanoid.Health -10
end
end)
end
The second script works without "if script.Parent.Steam.Enabled == true then" so it's something with that.
Thanks

2 comments
Try putting the if statement in the touched event...also when you check for a humanoid like that you can put "if humanoid then" instead of "if humanoid ~= nil"...just saves on a little work
Thanks it worked