Im currently making a script but it's too long , i have 1 part that just doesn't work , there are 2 digits X and Y , X + 1 every second while Y + 1 every 5 seconds , but when i used while true do for both of these , randomly 1 gets added , the other doesn't , i don't know any other ways , can somebody give me other ways to do this ?
local x = 0
local y = 0
while true do
x = x + 1
wait(1)
print("Test")
end
while true do
y = y + 1
print("Test_2")
wait(5)
end

1 comment
wrap it in a coroutine or spawn(function(), they allow multiple loops to run