script.Parent
is an IntValue
and the IntValue
's parent is also an IntValue
.
This script is stored in game.ServerStorage
until an event elsewhere is triggered. Once the event is triggered it moves it into the IntValue
. The script goes to it's destination but it doesn't change the value of it's parent. The parent's parent has a value.
I don't know how to fix this, I tried adding an AncestryChanged
event but that doesn't work because the script doesn't enable until it's out of the storage and by then it's parent is already the IntValue
.
Actually, the script doesn't even run because when I tested it I had a print("string")
on line 1 and it never printed anything. I checked if the script was disabled but disable was false.
I don't know what else I could do :|
local plrpressure = script.Parent local plrlvl = script.Parent.Parent if plrlvl.Value >= 0 and plrlvl.Value < 1000 then plrpressure.Value = 2 elseif plrlvl.Value >= 1000 and plrlvl.Value < 3000 then plrpressure.Value = 3 elseif plrlvl.Value >= 3000 and plrlvl.Value < 10000 then plrpressure.Value = 4 end