hello!
im currently made my model rotating, it might be a stupid thing but i dont know how to make the model rotation speed slower
here the script inside the model:
local model = script.Parent
local primPartCFrame = model:GetPrimaryPartCFrame()
i = 1
stuff = false
repeat
local rotation = CFrame.Angles(0,math.rad(i),0)
local rotCFrame = primPartCFrame * rotation
model:SetPrimaryPartCFrame(rotCFrame)
if i <360 then
i = i +1
else
i =1
end
wait()
until stuff == true
local TS = game:GetService("TweenService")
local model = script.Parent
local primPartCFrame = model:GetPrimaryPartCFrame()
local Tweeninfo = (2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
TS:Create(primPartCFrame, Tweeninfo, CFrame.Angles(0,math.rad(i),0)):Play()
Gotta define i, and if you want it to repeat forever, change Tweeninfo to local Tweeninfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, false)
it gives me an error in the output
Unable to cast dictionary
in the line 5 TS:Create(primPartCFrame, Tweeninfo, CFrame.Angles(0,math.rad(-120),0)):Play()
its bc i have a menu where in the background there this model that is spinning to give it an effect like if the camera is rotating, but anyways i fixed it