I'm trying to make a gamemode selection, I use an Int Value and I did that if the value is 0 it makes the text say Solo, If it's 1 it makes it say Duo (Team of 2). The problem is that when I press the previous gamemode button and it says solo it doesn't do anything, But if it says Duo it makes it say Solo but I want it to when it says Solo and I press it, The text says Duo (Team of 2).
This is my first script:
local Gamemode = script.Parent
local Next = Gamemode.NextGamemode
local Previous = Gamemode.PreviousGamemode
local GamemodeValue = Gamemode.GamemodeValue
Next.MouseButton1Click:connect(function()
GamemodeValue.Value = GamemodeValue.Value + 1
end)
Previous.MouseButton1Click:connect(function()
if GamemodeValue.Value == 0 then
GamemodeValue.Value = 1
end
if GamemodeValue.Value == 1 then
GamemodeValue.Value = 0
end
end)
This is my second script:
local ChosenGamemode = script.Parent.Parent.ChosenGamemode
while true do
wait(0.01)
-- Gamemode Limit
if script.Parent.Value == 2 then
script.Parent.Value = 0
end
-- Gamemode Text
if script.Parent.Value == 0 then
ChosenGamemode.Text = "Solo"
end
if script.Parent.Value == 1 then
ChosenGamemode.Text = "Duo (Teams of 2)"
end
end
Btw, This script is inside the Int Value.
Thanks, MajinBluee

4 comments
That doesn't work
Errors? If not, add prints to see where it goes wrong.
I did a print on each thing and all of this is fine, But it's not working
Is it a LocalScript inside the gui?