connection = game:GetService("RunService").RenderStepped:Connect(orbitUpdate) return connection -- to disconnect later end
-- ModuleScript: HatOrbitController local HatOrbitController = {} function HatOrbitController.startOrbit(hatHandle, targetPart, radius, speed, heightOffset) local angle = 0 local connection
-- Run every render frame for smooth movement RunService.RenderStepped:Connect(updateOrbit)