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

Why my game panel is adding more coins then normal?

Asked by 4 years ago
Edited 4 years ago

Hello once more, i am trying to do a race game,but when the players win,the first race it all goes okay,but in next,the player gets added more coins then normal?

Here is the script (Server-sided):

01local ChangeText = game.ReplicatedStorage.GameTextShare
02local Space = 1
03local Maps = game.ReplicatedStorage.Maps:GetChildren()
04while true do
05    if #game.Players:GetPlayers() == 1 then
06        ChangeText:FireAllClients(Space,"Not enough players! At least 2 players needed.")
07        wait(1)
08    else
09        for i = 30,1,-1 do
10            ChangeText:FireAllClients(Space,"Intermission: "..tostring(i))
11            wait(1)
12        end
13        ChangeText:FireAllClients(Space, "Selecting random map...")
14        wait(5)
15        local SelectedMap = Maps[math.random(1, #Maps)]:Clone()
View all 62 lines...

If you need more information ask If it is a math problem sorry, i am not so good at it. Thanks.

0
This is most likely happening because you don't have any sort of `Debounce` in your script. Try adding one! zane21225 243 — 4y
0
Please somebody answer it my game depends on it ;-; yuni_Boy1234 320 — 4y

Answer this question