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

Annoying issue that I somewhat cannot solve, any help please?

Asked by
Hero_ic 502 Moderation Voter
8 years ago

So it is saying I am not comparing a value correctly what is the issue? (its a string value

    if workspace.Votes.M1V.Value > 0 then
        workspace.Votes.Minigame1:GetChildren():Destroy()
    end
    if workspace.Votes.M2V.Value > 0 then
        workspace.Votes.Minigame2:GetChildren():Destroy()
    end

10:04:06.687 - ServerScriptService.Intermission:5: attempt to compare number with string

If you have helped me, well then thank you!

0
Hey, did my answer do any good? Acheo 230 — 8y

1 answer

Log in to vote
2
Answered by
Acheo 230 Moderation Voter
8 years ago

You stated that you're attempting to use a StringValue. You're trying to detect if a text is greater than 0.. I don't believe that's possible ;) Try using a NumberValue, my friend.

0
thanks for the help! Hero_ic 502 — 8y
0
Welcome! Acheo 230 — 8y
0
You can do that, actually. ChemicalHex 979 — 8y
Ad

Answer this question