I really couldn't put a more accurate title because it's more than one question. You see I made a script that every time a player joins my game, the script will check their money. If the money amount is inferior to 1, a Bindable-Function will disable the Local-Script.
local Disabler = game.ServerStorage.Disabler Disabler.OnInvoke = function() print("Temporarily disabling script....") game.StarterPack.LocalScript.Disabled = true end
Now, if the money amount is superior to 1, another Bindable-Function will un-disable it.
local UnDisabler = game.ServerStorage.UnDisabler UnDisabler.OnInvoke = function() print("UnDisabling Devil Fruit Special tool") game.StarterPack.LocalScript.Disabled = false end
What I want is for the Local-Script to not work until that person reaches the money amount required.
Don't use Disabled
to "enable" or "disable" scripts. Really, Disabled
should almost not exist.
Instead, use an if
to check some other BoolValue
or similar object.
Or, better yet, if you're comparing money, why not just check it in the LocalScript, rather than in the server's Script?
The StarterPack doesn't belong to any one person. It is what given to each person each time they spawn -- where it copies the object.
Changes to the StarterPack / StarterGui don't affect players that are currently alive.