I’ve been trying to make a clock tower and made a script to rotate decals of hour and minute hands to a 1000x sped up 24h clock, but the script only detects one clock out of the four, is there any way to solve this?
There weren’t any errors or anything which made it more weird on why it only worked on one clock face, I changed the layout a bit and script location to see if that would help but that didn’t help much
local daynightscript = game:GetService("ServerScriptService"):FindFirstChild("Daynight", true)
print(daynightscript)
local collection = script.Parent
local multiplier = daynightscript.Attributes:GetAttribute("Multiplier")
local steps = multiplier
local deb1 = false
local deb2 = false
local minutetime = 0.1
local hourtime = 0.0083333333
game:GetService("RunService").Heartbeat:Connect(function()
for _, minutehands in pairs(collection:GetDescendants()) do
if minutehands:IsA("Decal") then
if minutehands.Rotation >= 359 then
minutehands.Rotation = 0
end
end
if minutehands.Name == "MinuteHand" and minutehands:IsA("Decal") then
if deb1 == true then return end
deb1 = true
minutehands.Rotation += minutetime / steps * multiplier
task.wait(1/steps)
deb1 = false
end
if minutehands.Name == "HourHand" and minutehands:IsA("Decal") then
if deb2 == true then return end
deb2 = true
minutehands.Rotation += hourtime / steps * multiplier
print(hourtime)
task.wait(1/steps)
deb2 = false
end
end
end)

