script.Parent.Health.Changed:connect(function (HealthCheck)
script.Parent.Parent.Name = "Car Health: " ..script.Parent.Health.."/100"
wait(1)
end)
Health: 100/100.Humanoid.Script:1: attempt to index field 'Health' (a number value)
?
Can't do .Changed on variables, events effect objects only.
script.Parent.Changed:connect(function(HealthCheck)
if HealthCheck=="Health" then
script.Parent.Parent.Name = "Car Health: " ..script.Parent.Health.."/100"
wait(1)
end
end)
@Trapping
Learn more events. =P
script.Parent.HealthChanged:connect(function (HealthCheck)
script.Parent.Parent.Name = "Car Health: " ..script.Parent.Health.."/100"
wait(1)
end)
All you had to do was miss the dot. xD
Aye, brother. Btw, what I just said to ya was sarcastic. xP
The HealthChanged event actually passes the amount of
health to the function. And since that's how OPoster built
up his function, I think it was just a ... typo of some kind?
:D?