Tweens do actually have a built in way of making themselves run indefinitely. As per the wiki, it has the following snippet of:
local tweenInfo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
The -1 for the RepeatCount parameter is what you are looking for. So in your case, that would give you this code:
local tweenService = game:GetService("TweenService")
local Rock = script.Parent
local tweeningInfo = TweenInfo.new(
3, -- Duration
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
-1 -- Loop indefinitely
)
Well, I wouldn’t know of any issue with math.huge, but I’m no expert when it comes to programming languages (and nor will I pretend to be). math.huge on Roblox is basically something used to be larger than anything calculable by the system, so a pseudo-infinite in some way.
But I would think that using the -1 trick would be more likely to break later on. Someone in the future’s gotta see that and be like, “Wait, that makes no logical sense, ERROR.”