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

What is wrong with this script?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
local intermission = script.Parent.intermission
local val = Instance.new('StringValue')
val.Parent = game.ReplicatedStorage
val.Name = 'intermission'
val.Value = 30
while true do
    if val.Value == 30 then
        val.Value = val.Value - 1
        repeat until val.Value == 0
    end
end

this script wont do anything and it does not show any errors in output

0
Well.. what is it supposed to do? james24dj 90 — 9y
0
the admins are pis s ing me off! there was something wrong with this script so i put the question as what is wrong with this script? and the fu ck ing admin said make the question title relevant to my question. it is fu cki ng relevant to my question. thegamingpro566 0 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Try using a NumberValue rather then a StringValue. It might not be seeing the StringValue as a Number so it won't subtract anything from it.

0
And then use tonumber on the string value to make it a number. CoyoteChamp23 25 — 9y
0
thanks that was not the problem but i figured out the problem but thanks for your help thegamingpro566 0 — 9y
Ad

Answer this question