I'm trying to offset this CFrame a little bit. I only really want an offset of a couple of studs, but that didn't do anything, so I changed it to 100. It still did absolutely nothing. Yes, my script is enabled and everything. There's no output. Idk why the cframe isn't being given an offset.
--The 'tor' variable is an NPC's Torso. I want the NPC to face you, with a slight offset. local direction = (plr.Character.Torso.Position - tor.Position) * Vector3.new(1, 0, 1) local offset = CFrame.new(0,0,-100) --A crazy big number, yet it still doesn't do anything? BodyGyro.cframe = CFrame.new(tor.Position, tor.Position + direction) BodyGyro.cframe = BodyGyro.cframe * offset
BodyGyro only affects rotation, not position. If you want an offset, you should use a BodyPosition object as well as the BodyGyro (make sure to set the BodyForce.maxForce appropriately, depending on the mass of the object). Then, use the BodyPosition.position property:
BodyGyro.cframe = CFrame.new(tor.Position, tor.Position + direction) BodyPosition.position = BodyGyro.cframe * offset.p -- offset.p instead of offset so that the result is a Vector3