So I have a clock here, it uses Motor6Ds and all that to rotate the hands and stuff. But I've noticed that when the minute hand moves, it gradually gets slower, instead of it going fast at the start (moving every increment i believe.) and once it hits the next hour, it re-does this pattern. This also applies to the hour hand a bit, as it only moves a bit forward after some time, instead of it always moving. What is the problem here?
-- // Services local LightingService = game:GetService("Lighting") local RunService = game:GetService("RunService") -- // Math local Pi = math.pi local Floor = math.floor local Ceil = math.ceil -- Some of these will be used later unless I actually need to. -- // Instances local hHand = script.Parent:WaitForChild("HourHand") local hWeld = hHand.Hand.Motor6D local mHand = script.Parent:WaitForChild("MinuteHand") local mWeld = mHand.Hand.Motor6D local globalHours local globalMins --[[ 1h = pi*2 1h = 60m 60m = pi*2 1m = (pi*2)/60 2m = ((pi*2)/60)*2 60m = ((pi*2)/60)*60; pi*2 ]]-- -- // Looping while true do globalMins = LightingService:GetMinutesAfterMidnight() globalHours = globalMins/60 local Min = globalMins - (Floor(globalHours) * 60) if Min < 1 then mWeld.CurrentAngle = 0 end mWeld.DesiredAngle = ((Pi * 2)/60) * Min hWeld.DesiredAngle = ((Pi * 2) * globalHours/12) - (Pi * 2) RunService.Heartbeat:Wait() end