Hello! I'm having a small issue creating a map voting system and I was wondering if anyone could help!
Here's the Script:
for i, player in ipairs(game.Players:GetChildren()) do
local value = player.PlayerGui.MapVote.VoteFrame.SelectedMap.Value
if value == 1 then
print("Received")
EFVotes = EFVotes + 1
elseif value == 2 then
print("Received")
AAVotes = AAVotes + 1
elseif value == 3 then
MMVotes = MMVotes + 1
elseif value == 4 then
VVVotes = VVVotes + 1
elseif value== 5 then
FAVotes = FAVotes + 1
elseif value == 6 then
DDVotes = DDVotes + 1
elseif value == 0 then
print("No Vote Submitted")
end
end
I've double-checked the value variable, and also checked the NumberValue it's getting it's info from. They both work well and assign the numbervalue correctly, this script is just having a problem getting that value.
Testing the script, the value was set to 2, and it comes out as "No Vote Submitted"
(The Variables EFVotes, AAVotes, MMVotes, FAVotes, DDVotes, and VVVotes were assigned to 0 outside of the code snippet)
Many Thanks, GlitchedMastermind

2 comments
Also, I'm a nooby scripter, so this is probably a Grade-A
....Noob Mistake. I even posted it when i wasnt finished lmao