Hello
I’m developing a rotate animation for my pets in a viewport.
I’m using RunService
but I don’t know if it’s the best method.
Will this causes some lags ?
Here my code
local function(model)
return RunService.RenderStepped:Connect(function()
model:PivotTo(model:GetPivot() * CFrame.Angles(0, math.rad(1), 0))
end)
end
Here my roblox-ts
code:
const rotateModel = (model: Model) =>
RunService.RenderStepped.Connect(() => {
print(model)
print(model.Parent)
model.PivotTo(model.GetPivot()!.mul(CFrame.Angles(0, math.rad(1), 0)))
})