I'm trying to make a damaging thing, where there is a script that has a value named 'damage'. It's supposed to do 4 - 2 but I always get this error
--gunfire
while true do
local firerate = 2--in seconds
damage = script.Parent.Damage.Value --currently 2
local me = script.Parent
wait(firerate)
local enemy = workspace:WaitForChild("Normal")
me:SetPrimaryPartCFrame(CFrame.new(me.PrimaryPart.Position, enemy.Position))
script.Gunshot:Play()
enemy.Health.Value = enemy.Healht.Value - damage
end

2 comments
Tracer , Doing That is not accurate for some reason on roblox because roblox's heath number can be a bit funky at some times. It is always best to Not Use
Heath = Heath - DamageAnd To Always Use TheHumanoid:TakeDamage(Damage)Method)its not a humanoid