wait(0.01)
local target = randomPlayer()
if target then
local targetPos = target.HumanoidRootPart.Position
local distVector = targetPos - origin
local direction = distVector.Unit
part.Barrel.Position = origin
part.Barrel.CFrame = CFrame.lookAt(part.Barrel.Position, targetPos)
end
end```
#Barrel pointing the wrong way from cframe.lookat
4 messages · Page 1 of 1 (latest)