Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is the following line of code valid?

Asked by 8 years ago

And if not, are there any methods to make it so?

----Player has been defined before in this script scenario
local Lo_Var = Player.Status.Value

1 answer

Log in to vote
0
Answered by 8 years ago

No, you can't.

The LocalScript saves the value, and basically turns it into a static value.

To remedy this, us the .Changed event:

local val = Player.Status
local Lo_Var = val.Value

val.Changed:connect(function()
    Lo_Var = val.Value
end)

Hope I helped!

~TDP

0
Thank you! CoolJohnnyboy 121 — 8y
Ad

Answer this question