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

How to make this work?[Answered]

Asked by 10 years ago
if GrassyFieldVotes > CityVotes then
            m.Value = "Inserting 'Grassy Field' by Coolviper630..."
            wait(3)
            gf = maps.GrassyField:Clone()
            gf.Parent = game.Workspace
            m.Value = ""
        end

I'm making a GUI Map Voting System, and it's not working out, I need help! GrassyFieldVotes is variable which is equal to GrassyFieldVotes = game.Lighting.MapValues.GrassyField[Name of the IntValue] and CityVotes = game.Lighting.MapValues.City[Name of the IntValue], so if the grassy field value number is greater then the city value show the message that map will insert wait 3 seconds clones it and make the m.Value = to nothing but dis won't work someone help plz ty ive been trying to figure this out for 2 days!

2 answers

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

If GrassyFieldVotes and CityVotes refer to the IntValues themselves, you have to use GrassyFieldVotes.Value and CityVotes.Value to compare their Values.

0
Yes, but are you trying to check if one IntValue is greater than the other, or if one IntValue's *Value* is greater than the other's *Value*. In other words, add '.Value' after both GrassyFieldVotes and CityVotes (without a space in between), and see if the code works then. adark 5487 — 10y
0
it works, I figured it out I changed it for both maps vairable ill use city vairable xampme local cityVotes= game.Lighting.MapValues.City i took out .Value from the vairable and it works Coolviper630 95 — 10y
Ad
Log in to vote
0
Answered by
Ulysies 50
10 years ago

for this your saying that in order for this script to work every time the GrassyFieldVotes always has to be more. Unless you have another script being vise versea.

Answer this question