Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Help with :SetPrimaryPartCFrame ?

Asked by 2 years ago

Really rusty, trying to make a rotating model, using SetPrimaryPartCFrame, spent like 15 minutes like a neanderthal trying to figure out what's wrong, don't seem to find anything.

Script outputs no errors, it's just that the model has been rotated only once in a wrong direction, has nothing to do with the "Vector3.new(0, 5, 0)" part, happens even with it changed to 0.

Too tired to write any other details, but it has something to do with me being an ape and not completely understanding CFrame, send help lol.

local RunService = game:GetService("RunService")

RunService.RenderStepped:connect(function()
local CF = CFrame.new(script.Parent.Radar:GetPrimaryPartCFrame().p, script.Parent.Radar.PrimaryPart.Orientation + Vector3.new(0, 5, 0))
script.Parent.Radar:SetPrimaryPartCFrame(CF)
end)

Answer this question