My script will not work, nothing in output

So, I’m making a timer for my FPS game and logically, this code should work but it doesn’t. Can someone explain why? I know it’s this script because I’ve checked that the “Game” thingy did change. I tried while true do and I still had the same issue.

local RS = game:GetService("ReplicatedStorage")

script.Parent.Data.Game.Changed:Connect(function()
	print("Change!")
	if script.Parent.Data.Game.Value == true then
		local counterfolder = RS.ACS_Engine.Counter
		local mins = counterfolder.Minutes --Number value
		local seconds = counterfolder.Seconds --Number Value
		local secondsformatted = counterfolder.SecondsFormatted --String value
		local total = counterfolder.Time --String value
		repeat
			wait(1)
			if seconds.Value ~= 00 then
				seconds.Value = seconds.Value -1
			else
				mins.Value = mins.Value -1
				seconds.Value = 59
			end
			if seconds.Value < 10 then
				print("OK")
				secondsformatted.Value = "0"..seconds.Value
			else
				secondsformatted.Value = seconds.Value
			end
			total.Value = mins.Value..":"..secondsformatted.Value
		until total.Value == "0:00"
	else
		print("What...")
	end
end)
1 Like

huh, The code seems to be fine, try restarting Roblox studio, maybe the output viewer is glitched

1 Like

The timer itself doesn’t start, but I will try that.

I restarted studio and I’m still having the issue, I feel like it’s a bug.

Where is the script located? If it is in a storage folder, it will not execute.

Try doing putting a print at repeat wait(1) to see if there is something wrong there.

Script is located in ServerScriptService

Is the script a local script or a global script?

The script is a server script.

Hmm. Have you tried the print method I posted?

I just tried it, it did not work.

Wait so, did print show up on the logs or not?

Nope, nothing printed in the output.

Strange, I’ve managed to get it to work. Maybe it’s something to do with how you are changing the value of Game?

1 Like

Did you get any print from the (“Change!”)?

Oh huh. That’s odd, he managed to get it working. Maybe it’s the place or the certain type of ACS engine your using?

I just managed to get it to output.

Try experimenting with the line 14. It seems that something maybe wrong with it!

Wait a minute, I accidentally made Seconds value a string value

Oh. Try fixing that. Hopefully it will work.