Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need help with this?

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.

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.