Ad
Log in to vote
0

IntValue didn't being receive by scripts?

Asked by 12 days ago

I was trying to make the health value down but I won't be update! and the original value is 10. when I test it the value is alr -4 but the value being print by the script is still stuck on 10!! HELP

if script.Parent.Health.Value == 10 then
    script.Parent.Grass1.Transparency = 0
    script.Parent.Grass1.Size = Vector3.new(.1,0.65,0.1)
elseif script.Parent.Health.Value >= 8 then
    print("level 2")
    script.Parent.Grass1.Size = Vector3.new(.1,0.93,0.1)
    script.Parent.Grass2.Transparency = 0
    script.Parent.Grass2.Size = Vector3.new(.1,0.7,0.1)
    wait(0.4)
    script.Parent.Grass3.Transparency = 0
    script.Parent.Grass3.Size = Vector3.new(.1,0.60,0.1)
end

while true and wait(1) do 
    print(script.Parent.Health.Value)
end

SOrry for broken english

0
Where is that script located? If it's on the server then obviously the health variable won't update if you set it via the client TheRealJMHacker 24 — 12d
0
The script is located in workspace.Grass.script (Grass is a group) AustinTan0615 2 — 11d

1 answer

Log in to vote
0
Answered by 10 days ago

Nvm I use remote event with it and it work Thanks @TheRealJMHacker :))

Ad

Answer this question