I’m trying to make it so that my tower is facing the target its attacking, but when I do it the part just moves around, like here:
robloxapp-20230702-2352330.wmv (2.9 MB)
as you can see it just phases through the thing, i want it so it doesn’t phase through and just stays and rotates in one place, heres the code if you want
local targetCFrame = CFrame.lookAt(newTower.HumanoidRootPart.CFrame.p, target.PrimaryPart.Position*Vector3.new(1,0,1) + Vector3.new(0,newTower.HumanoidRootPart.CFrame.Y,0))
newTower.HumanoidRootPart.CFrame = targetCFrame
newTower.HumanoidRootPart.CFrame *= CFrame.new(1,0,1)
I’ve tried doing Piviot to or anchoring the parts but none of these work and i haven’t found any useful posts, please help me, thanks.