You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
i want to make a game called “FuzzBuzz” Idea by: Augustus_Alderidge, Basically when the round starts you need to count up to whatever is the max number and if you dont say a number in order or like a word you basically not be in the round anymore and if the max number is 450 and the current number is 449 whoever said 450 wins, but im having a problem
- What is the issue? Include screenshots / videos if possible!
the issue is that the for loop dosent run the function, it just does the intermission again and again and it will never stop
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried removing the waits and it still does the same problem
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
and also put a reply that also help the problem i will face when the OG problem is fixed
my script:
local PlayersInRound = {}
local Values = game:GetService("ReplicatedStorage"):WaitForChild("Values")
local Textlabel1 = Values:WaitForChild("Text1")
local Textlabel2 = Values:WaitForChild("Text2")
local NumberOn = Values:WaitForChild("NumberOn")
local PlayerValue = Values:WaitForChild("Players")
local MaxNumber = Values:WaitForChild("MaxNumber")
local RemainingPlayers = Values:WaitForChild("RemainingPlayers")
local Winner = Values:WaitForChild("Winner")
local TypedFirst = Values:WaitForChild("TypedFirst")
local function EndRound(Winner, TextLabel1, TextLabel2)
TextLabel1.Value = Winner.." Has Won!"
TextLabel2.Value = ""
PlayersInRound = {}
wait(3)
end
local function StartRound(AmountPlayers, PlayersRemaining, RandomNumber, NumberOn, MaxNumber)
if AmountPlayers >= 2 then
while true do
MaxNumber.Value = RandomNumber
PlayersRemaining = AmountPlayers
NumberOn.Value = 0
Textlabel1.Value = "Round Started, Current Number is "..NumberOn.Value.." Type "..1 + NumberOn.Value.." On the chat box the Current Number Goes Up Until Someone types the max number."
Textlabel2.Value = "Players Remaining: "..PlayersRemaining
if game.ReplicatedStorage.Values.Winner.Value ~= "" then
break
end
if game.ReplicatedStorage.Values.TypedFirst.Value ~= "" then
Textlabel2.Value = game.ReplicatedStorage.Values.TypedFirst.Value.." Typed First"
end
if NumberOn.Value == MaxNumber.Value - 1 then
for i,v in pairs(PlayersInRound) do
v.Chatted:Connect(function(m,s)
if m == tostring(MaxNumber.Value) then
game.ReplicatedStorage.Values.Winner.Value = v
EndRound(Winner.Value, Textlabel1.Value, Textlabel2.Value)
end
end)
end
elseif NumberOn.Value ~= MaxNumber.Value - 1 then
for i,v in pairs(game.Players:GetPlayers()) do
v.Chatted:Connect(function(m,s)
if m ~= tostring(NumberOn.Value + 1) then
table.remove(PlayersInRound, i)
Textlabel2.Value = v.Name.." Has Typed "..m.. "And its not "..1 + NumberOn.." And he/she is out of the game."
wait(3)
else
game.ReplicatedStorage.Values.TypedFirst.Value = v
end
end)
end
end
end
end
end
while wait() do
for i = 15,0,-1 do
Textlabel1.Value = "Intermission: "..i
i = i - 1
wait(1)
if i == 0 then
Winner.Value = ""
TypedFirst.Value = ""
if PlayerValue.Value < 0 then
Textlabel1.Value = "Not Enough Players"
wait(2)
else
StartRound(PlayerValue.Value, RemainingPlayers.Value, math.random(50,2500), NumberOn.Value, MaxNumber)
end
end
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.