You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I made a time like COUNTDOWN. but I have a problem with this. where when seconds and Minutes end why hours don’t add to Minutes? well I’m really bad at Scripting I’ve searched for solutions on Youtube and also AI but didn’t get the results I found. -
What is the issue? Include screenshots / videos if possible!
Script
game.Players.PlayerAdded:Connect(function(Player)
local Folder = Instance.new("Folder", Player)
Folder.Name = "FolderJam"
local hoursVa = Instance.new("IntValue")
hoursVa.Name = "hours"
hoursVa.Value = os.date("%H1")
hoursVa.Parent = Folder
local minuteVa = Instance.new("IntValue")
minuteVa.Name = "Minute"
minuteVa.Value = 59
minuteVa.Parent = Folder
local secondsVa = Instance.new("IntValue")
secondsVa.Name = "seconds"
secondsVa.Value = 1
secondsVa.Parent = Folder
spawn(function()
while wait(1) do
minuteVa.Value -= 1
if minuteVa.Value <= 0 and secondsVa.Value > 0 then
secondsVa.Value -= 1
minuteVa.Value = 59
elseif minuteVa.Value <= 0 and secondsVa.Value <= 0 then
hoursVa.Value = os.date("%H")
secondsVa.Value = 0
minuteVa.Value = 0
end
end
end)
end)
LocalScript
local player = game.Players.LocalPlayer
wait(2)
game.Players.LocalPlayer.FolderJam:WaitForChild("Minute"):GetPropertyChangedSignal("Value"):Connect(function()
local minuteVa = game.Players.LocalPlayer.FolderJam:WaitForChild("Minute").Value
local secondsVa = game.Players.LocalPlayer.FolderJam:WaitForChild("seconds").Value
local Jam = game.Players.LocalPlayer.FolderJam:WaitForChild("hours").Value
if Jam > 0 or secondsVa > 0 or minuteVa > 0 then
game.Workspace.KotakBoxGear.KotakPart.BillboardGui.TextLabel.Text = string.format("%02d", Jam)..":".. string.format("%02d", secondsVa)..":".. string.format("%02d", minuteVa)
else
print("Work..")
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.