okay so I lied about my issue what i am actually trying to do is make a jumpscare and I need to get the position in front of the monster to tween the camera to
Here is what I did based on what you said which seems to work
the only issue is that its facing the same direction the monster is facing. I want it to be facing toward the monster
the reason I lied about the issue is because the solution for both things is practically the same and Its just so much easier to make a post and to convey what I am trying to do
this is a video showing what the jumpscare is right now
It works but its not the best. There are so many issues with the jumpscare and its really annoying since I have been working on it for the past 4 hours
1 issue is that its not consistent with the position when I tween the camera. Sometimes its too high and sometimes its too low but I want it to be professional and perfect.
2nd issue is that the monster keeps falling over even though it doesnt collide with the player and I dont know how to get it to stop
3rd issue is the monster has to completely walk inside of the player sometimes even though my script checks if the monster is 15 studs away.
I do not know why there are so many issues and I havent been able to solve any of them regardless of the amount of work I have put in
Here is a video which shows you:
See how its so unproessional and chaotic. I dont know how to fix it!!!
The issues you are mentioning are unrelated to the post’s title " How to get the position of the front side of a part". What I provided above is the answer exactly to your initial post’s title and description, but now you seem to be asking about way more things, and I doubt anyone can answer all of these with so little context.
It would be too much to write code to fix all of these, but here are some tips I would give you:
This is because you tween to the initial monster’s position. However your monster seems to be moving even after the Tween is created. If your monster moves a little higher or lower, then the initial point you started tweening the camera to, is not the correct one anymore. It seems like you want more of a Camera Focus/Following system, rather than a Tween.
How do you control your monster’s movement? If you are using body movers, make sure to read on AlignOrientation.
Here there are many moving parts that could go wrong. How often are you checking for the distance between the monster and player? How do you actually make this check? Are your scripts local side or server side?