I'm attempting to use a clocktower clock for my game, but it's from a free model and it has a virus. Everytime I use Run, everything falls into the roblox abyss. But when I undo the changes to my game, ie adding the clock, everythings fine. I'm trying to eliminate the virus but I can't find it, heres what the script looks like.
local time_zone = -5 -- Time zone, offset from GMT.
local clock = script.Parent
local face = clock.Face
local hour_hand = clock.Hour
local minute_hand = clock.Minute
local second_hand = clock.Second
local secondsInDay = 60*60*24
function rotateClockHand(hand,rotation)
local lv = (face.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*face.Size.Y/2.5
hand.CFrame = face.CFrame*CFrame.Angles(0,-rotation,0) + lv
hand.CFrame = hand.CFrame - hand.CFrame.lookVector*hand.Size.Z/2
end
while true do
local tick = math.fmod(tick(),secondsInDay)
local hour = math.floor(tick/3600) + 5 + time_zone
local minute = math.floor(tick/60 - 60*hour)
local second = math.floor(math.fmod(tick,60))
rotateClockHand(hour_hand,hour*(math.pi/6) + minute*(math.pi/500))
rotateClockHand(minute_hand,minute*(math.pi/30))
rotateClockHand(second_hand,second*(math.pi/30))
wait(0.1)
end
Is it in the script? Or is it somewhere else in the clock? I can't seem to find it, no matter where I look on the model or the script. Before you ask I deleted almost everything but the parts to make it work.
Maybe if I find the answer, we will all know something about these virus and where to eliminate them :)

2 comments
This is the only script in the clock?
Yes