My round system doesn't work I don't know why

tell me which of these prints worked

1 Like

That did the same thing as the one before

1 Like

tell me which of these prints worked so we can see where the issue is

1 Like

They both printed done it also printed 30 for some reason

1 Like

Capture

1 Like

also this script is in StarterCharacterScripts

1 Like

we have time and TimerText.

which of them is the one you want?

1 Like

Time is an int value its the one that supposed to count down

1 Like
local Time = game:GetService("ReplicatedStorage"):WaitForChild("Time")
local player = game:GetService("Players").LocalPlayer
local timeText = game:GetService("ReplicatedStorage"):WaitForChild("TimerText")
local textLabel = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextLabel")
Time.Value = 30

while true do
	task.wait(1)
	for i = Time.Value, 0, -1 do 
        print("done") -- print?
		Time.Value= i
		textLabel.Text = "game starts in "..i.."s"
         print(timeText.Value) -- print?
		if Time.Value == 0 then
            print("done") -- print?
			player.Character.PrimaryPart.Position = game.Workspace.Part.Position
			textLabel.Visible = false
			break
		end
	end
end
1 Like
local Time = game.ReplicatedStorage.Time

local timeText = game.ReplicatedStorage.TimerText

local textLabel = game.StarterGui.ScreenGui.TextLabel

local player = game.Players.LocalPlayer

Time.Value = 30

while true do

wait(1)

Time.Value = Time.Value -1

timeText = "Game starts in "..Time.Value.."s"

textLabel.Text = timeText

if Time.Value == 0 then

player.Character.PrimaryPart.Position = game.Workspace.Part.Position

break

end

end

This is my original script it does count down but it doesn’t show in the gui

1 Like

does this work?
you might need a delay to slow it
see if the time value changes

1 Like

because of this.
you could access it the way I did and check.

1 Like

The value instantly changes from 30 to 0 and my camera gets gltchy too
it gets teleported but my character stays at spawn location

1 Like

add a task.wait at the bottom of the for loop, and put a number u want

local Time = game:GetService("ReplicatedStorage"):WaitForChild("Time")
local player = game:GetService("Players").LocalPlayer
local timeText = game:GetService("ReplicatedStorage"):WaitForChild("TimerText")
local textLabel = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextLabel")
Time.Value = 30

while true do
	task.wait(1)
	for i = Time.Value, 0, -1 do 
        print("done") -- print?
		Time.Value= i
		textLabel.Text = "game starts in "..i.."s"
         print(timeText.Value) -- print?
		if Time.Value == 0 then
            print("done") -- print?
			player.Character.PrimaryPart.Position = game.Workspace.Part.Position
			textLabel.Visible = false
			break
		end
      task.wait(3) -- change 3 to desired number
	end
end
1 Like

Mind sharing a video of it? it could help

1 Like

IT WORKS IT DOES COUNT DOWN AND SHOW THE GUI
but my camera still glitchy
i will send a video in a second

1 Like

glad to hear.

I tested it. It’s because it’s under a while loop. So it keeps teleporting you.

1 Like

robloxapp-20220608-1312062.wmv (1.6 MB)

wait i don’t know how to send a video

Yes, it’s because of this.
First try it without a while loop.
Second, you could make a variable, something like this -

local Time = game:GetService("ReplicatedStorage"):WaitForChild("Time")
local player = game:GetService("Players").LocalPlayer
local timeText = game:GetService("ReplicatedStorage"):WaitForChild("TimerText")
Time.Value = 14
local inround = false

while inround == false do
	task.wait(1)
	for i = Time.Value, 0, -1 do 
		print("done") -- print?
		Time.Value= i
		print(Time.Value) -- print?
		if Time.Value == 0 then
			inround = true
			print("done") -- print?
			player.Character:PivotTo(game.Workspace.Part.CFrame)
			break
		end
		task.wait(1.2) -- change 3 to desired number
	end
end

This would run once, if you want to run it more, you’d have to set inround to false somewhere else when needed.