So I'm trying to add a check that always sees whether _G.score is more than a certain integer. This is what I've put so far:
_G.score = 0
while true do
if _G.score < 5 then
game.ReplicatedStorage.ChangeChar:FireServer(game.ReplicatedStorage.Bacteria)
end
if _G.score > 5 and _G.score < 15 then
game.ReplicatedStorage.ChangeChar:FireServer(game.ReplicatedStorage.Virus)
end
wait(0.5)
end
However, this causes it to fire the first piece of code repeatedly rather than just check if it's more than 5 and if it is then FireServer.

1 comment
You can add a debounce to check if it has already fired or not.