The error happens in the _G.Vehicle Health, i also have another command that is is connected to this script its on the bottom
local hum = tie:FindFirstChild'Humanoid'
if hum and hum.Health/hum.MaxHealth <= .4 then
script.Alarm.Volume = 1
else
script.Alarm.Volume = 0
end
_G.VehicleHealth.Set(hum.Health/hum.MaxHealth)
end)
the script on the StarterGui
function _G.VehicleHealth.Set(n)
script.Parent.Parent.Visible = true
ChangeHealth(n,1)
end

1 comment
ew. global variables