I thought getting the position of the model then adding half of the Z Size from model:GetBoundingBox() would give me the Z location of this face but I then realised that the model centre isn’t always the centre of the bounding box. So how could I do this. I need this to take accessories into account.
If you’re trying to look for the front position of a character, you need to use CFrame.LookVector of the HumanoidRootPart by writing HumanoidRootPart.CFrame.LookVector. You will multiply this vector with a number for how far away to get it offset. Next, you should add the position of the HumanoidRootPart.Position. For only getting the Z, index with HumanoidRootPart.Position.Z.
If it happens to go backwards, reverse the polarity by adding a negative sign, like:
It would look something like character.HumanoidRootPart.CFrame*CFrame.new(0,0,-2), which is a CFrame 2 studs infront of the character which you can use .Position to get a Vector3 from. If you want to take into account the actual bounds of the players accessories and whatnot that will be a little more complicated
Sorry to be a pain but does anyone have any ideas? I’ve been trying somethings out but nothing has got me closer to getting the position in front of the character which takes accessories into account, such as the capybara I’m using to test this.