There are no errors
local states = script.Parent
local character = states.Parent
local humanoid = character.Humanoid
local onFire = states.OnFire
while onFire == true do
wait(0.5)
humanoid:TakeDamage(15)
end
There are no errors
local states = script.Parent
local character = states.Parent
local humanoid = character.Humanoid
local onFire = states.OnFire
while onFire == true do
wait(0.5)
humanoid:TakeDamage(15)
end
You arent getting the Value
of the BoolValue
, you are checking if the BoolValue
is exactly equal to true
which it isnt, It holds a boolean
, not Is a boolean
while onFire.Value == true do
task.wait(.5)
humanoid:TakeDamage(15)
end
Still no errors and its not working.
Lua reads this has BoolValue == true
, which is false. You need to get the value of the bool value, BoolValue.Value == true
or just BoolValue.Value
in the while loop condition.
while task.wait(0.5) do
if onFire.Value then
humanoid:TakeDamage(15)
end
end
Thank you.
Roblox doesn’t let me type less than 30
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.