This is a server script:

local humanoid = script.Parent.Humanoid
local damage1 = script.Parent.DamageInd.Smoke

humanoid.HealthChanged:Connect(function(health)
    if health < 1000 then 
        damage1.Enabled = true   
end
end)

I want the gun used to take the Humanoid's Health to change on the server, so the Smoke can enable if i shoot it under the desired amount of health (which is the 1000).

THIS IS NOT THE GUN SCRIPT.

The gun script is long, so i'll only post it when requested, if you're up to the challenge to make that work with this.

3 comments

0

smoke? im super confused. more info please.

0

https://developer.roblox.com/articles/Converting-From-Experimental-Mode. In the link provided, compare the code that uses Remote Event to the code that does not. Then you will see the requirements to implement Remote Event to your code. 

0

This is a vehicle health script. The smoke is one of the damage indicators.