Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with pointing a part to the player's mouse?

Asked by 4 years ago

Say you have a crystal. Now say you want that crystal to point at something, for instance your mouse.

This is the effect I'm trying to achieve, while the issue is one of the flat faces of the crystal is pointing to my mouse, not the point of the crystal itself.

This is really hard to explain and I wish I could post pictures here, but unfortunately to my knowledge this is not allowed.

location = mouse.Hit.p

crystal.CFrame = CFrame.new(crystal.Position, location)

I'm attempting to use UpVector but it's not working all that well. If I could get some help, I'd really appreciate it. If you need me to clarify anything, let me know.

This is just the code down to it's bare bones. I've tried everything with UpVector and it's a little frustrating.

Thanks again!

0
its probably because that flat face of the crystal is the lookvector, so simply using lookat will not do ArtBlart 533 — 4y
0
that's what I thought Chardinok 5 — 4y
0
@Chardinok Do you have any sort of program that can manipulate 3D models? Because you can just rotate the mesh in a 3D modling program. Benbebop 1049 — 4y
0
* CFrame.fromEulerAngles something 90 degrees HappyTimIsHim 652 — 4y

Answer this question