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

Why doesn't the value increase by one all the time, it varies?

Asked by
Ifesol 4
3 years ago
game.Players.PlayerAdded:Connect(function(player)

    local messageService = game:GetService("MessagingService")
wait(5)
messageService:SubscribeAsync("ClanSystem", function(message)
    messageService:SubscribeAsync("ClanSystem1", function(message1)


            if player.Name == message.Data and player:WaitForChild("ClanSystem"):WaitForChild("ClanInvites").Value  < 5 then

                print("You have been invited to the "..message1.Data.." Clan")
            end

            if player.Name == message.Data and player:WaitForChild("ClanSystem"):WaitForChild("ClanInvites").Value  < 5 then
                player:WaitForChild("ClanSystem"):WaitForChild("ClanInvites").Value += 1
            end

    end)
    end)
    end)




The value first increases by 1 then increases by 2 and etc

0
try to use print to see if the code is running once more each time Miniller 562 — 3y

Answer this question