i would like to know how to make a part rotate within a viewport frame using scripts, as shown in the title of this post. i found some things that could’ve helped me but to no avail.
i assume the script would be easy, since its just rotating a part along its X axis indefinitely at a set angle. Still, i would like some help for this task.
it’s kinda just as simple as using tweening or using a while loop
here’s how i’d do it:
put a local script inside the viewport frame, then put this code in
local spinTime = 1 -- adjust to whatever speed you want (lower = faster)
local part = script.Parent.Part
local info = TweenInfo.new(spinTime, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
local properties = {Orientation = Vector3.new(180, 0, 0)}
game:GetService("TweenService"):Create(part, info, properties):Play()