I am 1 step to program my turret system | cannon, but, I need something first…
The set up!
How can I do it?
How can I make it Rotate (not the code, like, what do I use xd)?
Main part?
Motor6D?
You can use Model:SetPrimaryPartCFrame to set the CFrame of a Model’s PrimaryPart.
Perhaps something like this?
local model = script.Parent
local function faceModelTowards(point)
model:SetPrimaryPartCFrame(CFrame.new(model.PrimaryPart.CFrame.Position, point))
end
faceModelTowards(workspace.SomePart.Position)
2 Likes
Yes, but, what if it’s something like, a moving object a turret in a car?
For that a Motor6D might be most effective. Setting the Motor6D.Transform property is probably what you want to do.
1 Like