Help With Timer

So I’m Trying To Make A Timer Reset After Touching A Block And It Won’t Work Need Help.

Playing Is Apart Of Player

local TimeText = script.Parent.TimeText
local Playing = script.Parent.Parent.Parent.Playing
local Time = 0

while wait() do
    if Playing.Value == true then
        TimeText.TextColor3 = Color3.new(255, 255, 255)
        TimeText.Visible = true
        TimeText.Text = Time.."s"
        wait(0.05)
        Time = Time + 0.1
    elseif Playing.Value == false then
        TimeText.TextColor3 = Color3.new(0, 255, 0)
        Time = 0
        wait(3)
        game.StarterGui.TimeGui.TimeText.Visible = false
    end
end
local plr = game:GetService("Players")

game.Players.PlayerAdded:Connect(function(plr)
	script.Playing:Clone().Parent = plr
end)
1 Like

What exactly is the goal of this script?

A Timer For My Game When They Go Into An Obby The Timer Starts And Then Ends When They Touch The End Blocks

Just use a normal server script in the what I assume is the winpad, then use a code fire a remote to the client that stops the timer. Not quite recommended, but it is the most simple solution.

1 Like