There are a lot of ways to make these things spin, but I’ll outline two options:
Without scripting:
You can use a HingeConstraint, which makes two Attachments act like a hinge mechanic towards each other. You need to add an Attachment to the object you want to spin and leave it unanchored. Then you need to add an Attachment to the object the spinner is connected to, so for example the wall behind it. Align the two Attachments and then initialize the HingeConstraint to create the mechanic. More info can be found here on the wiki.
With scripting:
A common approach is to change the object’s CFrame on a loop. In the case of a Model that you want to spin around, you would set a PrimaryPart first. To make the Model spin you would use a little piece of code like this:
local speed = 0.5 -- how quickly the model spins in radians per second
while true do -- loop every tick
local dt = game:GetService("RunService").Heartbeat:Wait() -- wait one frame, return how long you waited
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(0, dt * speed, 0))
end
Depending on the orientation of the PrimaryPart you might have to swap the arguments in the CFrame.Angles()
part.
If you want to make just a single BasePart spin, you can simply change its CFrame instead:
local speed = 0.5 -- how quickly the model spins in radians per second
while true do -- loop every tick
local dt = game:GetService("RunService").Heartbeat:Wait() -- wait one frame, return how long you waited
BasePart.CFrame = BasePart.CFrame * CFrame.Angles(0, dt * speed, 0)
end