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

What is the point and possible uses of value instances?

Asked by 5 years ago

What are the uses of value instances such as: NumberValue,StringValue,IntValue ect

0
They are needed if you want to use leaderstats. It is possible to avoid using them at all but in general they might help improve your game desing. User#5423 17 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

I use a lot of value instance.

  1. something like weapon has both client scripts and server script. client do the reloading, server does shooting, but they don't know how many bullets they have left until, there is a value instance they can share information.

  2. something need to share with other objects what it is. like a model, we keep cloning, but we lost who is who, if a model have a value instance saying "I am number 1", "I am in this location", all other scripts know what it is.

  3. a script wants to change all future behavior of an object. if it calls a bindable function, it is run once and return result. done. next time, start over again. no memory whatsoever. but if the external script sets the value instance of some object. scripts inside the object always check the value instance to determine what to do next. it has a "memory" "set by supervisor"

0
May I ask are value instances affected by FE so only server scripts can edit them? SWARMHOST77 12 — 5y
Ad

Answer this question