I wanted to know if anyone knew how to make a clock spin very fast instead of just going off of real time? I cant find any kind of free model that does that! here the premade script. Can i edit this to make it spin crazy fast? or can anyone design a new one?
local Hours, Minutes = 0, 0
while wait() do -- wait() is how fast it goes, setting it to 1 would be normal speed
if Hours == 24 then
Hours = 0
end
if Minutes == 60 then
Hours = Hours + 1
Minutes = 0
end
script.Parent.HourHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi / 2, 0, 0) * CFrame.Angles(0, 0, math.rad((Hours * 30) + (Minutes * .5))) * CFrame.new(0, .2, 0)
script.Parent.MinuteHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi / 2, 0, 0) * CFrame.Angles(0, 0, math.rad(Minutes * 6)) * CFrame.new(0, .3, 0)
end
This makes it spin quickly without setting the time itself.
ok that works! thank you! but i just realized I cant make my clock bigger! the entire point is i need a absolutely huge clock spinning very fast in the sky. Anyone know how to do that?
Well, I don’t know what your clock looks like, but maybe try something like this:
local Hours, Minutes = 0, 0
while wait() do -- wait() is how fast it goes, setting it to 1 would be normal speed
if Hours == 24 then
Hours = 0
end
if Minutes == 60 then
Hours = Hours + 1
Minutes = 0
end
script.Parent.HourHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi / 2, 0, 0) * CFrame.Angles(0, 0, math.rad((Hours * 30) + (Minutes * .5))) * CFrame.new(0, script.Parent.HourHand.Size.X/2, 0)
script.Parent.MinuteHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi / 2, 0, 0) * CFrame.Angles(0, 0, math.rad(Minutes * 6)) * CFrame.new(0, script.Parent.MinuteHand.Size.X/2, 0)
end
i actually am now using another code that analyzes the game time! here is the new code! local hours, minutes = string.match(game.Lighting.TimeOfDay, “^(%d%d):(%d%d)”)
script.Parent.HourHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) * CFrame.Angles(0, 0, math.rad(hours * 30)) * CFrame.new(0, 0.2, 0)
script.Parent.MinuteHand.CFrame = script.Parent.HandCenter.CFrame * CFrame.Angles(math.pi/2, 0, 0) * CFrame.Angles(0, 0, math.rad(minutes * 6)) * CFrame.new(0, 0.3, 0)