Soo i have an anchored part and i need it to follow the torso but with an offset in vector3 what would be the best way to do soo?
Edit: The part rotates towards a part
There's a whole article on CFrames, and this question has already been asked countless times.
Here's an example:
-- local script (to make things easy as an example) local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local pp = char.PrimaryPart while not pp do -- might not be needed; tbh this looks stupid; but it'll work with R15 and R6 wait() pp = char.PrimaryPart end local offset = Vector3.new(5,9,0) -- +5x, +9y, +0z local part = Instance.new("Part") part.Anchored = true part.CanCollide = false part.Parent = workspace while true do part.CFrame = pp.CFrame*CFrame.new(offset) wait() end
BlueTaslem has answered how CFrames work, and how this works, but I couldn't find his answer because there's no favorite option on ScriptingHelpers. sigh
But, to put it simply:
part1.CFrame = part1.CFrame*CFrame.new(vector3 to move it relative to part)
Good luck!