which is the most optimal? basically i use it inside a runservice to know if the player is walking, running or standing, i don’t know if it’s better to use:
if humanoid.WalkSpeed == correr.Value then
--code
end
A local variable is definitely more efficient when it comes to performance, but a value base doesn’t hurt, especially if you need it for other local/module scripts to access. Value base as an instance of course carries more data than a single locallized variable existing in the scope of the script. Once it’s parented to workspace, different engine functions and listeners are automatically connected. Should you be worried about performance issues in your case? Not at all.
Alright . Just bear in mind that exploiters have full access on their machine (maybe Byfron limits it a little). They have a lot of freedom in any local script, so it’s not worth wasting too many resources for fighting exploits on client side. You also don’t have to update the variable/value base every frame, only when the change occurs.