while wait() do
if script.Parent.Parent.BombTime.Value ~= "120" then
script.Parent.Script1.Disabled = true
script.Parent.Script2.Disabled = true
end
end
It basically disregards the 'if' statement and immediately disables the scripts.
while wait() do
if script.Parent.Parent.BombTime.Value ~= "120" then
script.Parent.Script1.Disabled = true
script.Parent.Script2.Disabled = true
end
end
It basically disregards the 'if' statement and immediately disables the scripts.
First of all, to check if a value is a int value don't put quotation marks around the number. Second, which you might already know, ~= means that you're checking if its NOT that number. Just remove the quotation marks around the 120. Good luck (:
Those are not parentheses...
Now I look stupid
So your script is this:
while wait() do
if script.Parent.Parent.BombTime.Value ~= "120" then
script.Parent.Script1.Disabled = true
script.Parent.Script2.Disabled = true
end
end
You should be using int/number values for numbers, therefore no quotation marks are needed. If your value is int/number your script should be this:
while wait() do
if script.Parent.Parent.BombTime.Value ~= 120 then
script.Parent.Script1.Disabled = true
script.Parent.Script2.Disabled = true
end
end
Hope this helps :) -ElmEditor (If this did help please press the ^ button, it motivates me to continue helping scripters)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Why is 120 in ""?
FYI -- Normally
Disabledisn't the right way to go about starting/stopping scripts. It's often, but not always, cleaner for the scripts to manage it themselves explicitly