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

Making a Part face the same way the Handle is facing? [This time, have Attempts Posted]

Asked by
KAAK82 16
10 years ago

my Thrown Item goes down not forward, the TopSurface is facing down (I cant Rotate the Tool cos it has a Mesh in it) I tried these...

item.CFrame = Tool.Handle.CFrame

item.CFrame = Tool.Handle.CFrame*CFrame.new(Numbers in here) --I think...

and a few more, didnt, work...

2 answers

Log in to vote
1
Answered by 10 years ago

Just get the lookVector of the CFrame of the Handle, like so:

local LV = Handle.CFrame.lookVector

This will return a vector that is facing in the direction that the Handle is facing. You could position the brick like so:

Brick.CFrame= CFrame.new(Brick.Position, Brick.Position + LV)

This won't change the position of the brick, but it will make the brick face the direction that the Handle is facing

0
Please upvote if you found this answer helpful :) TurboFusion 1821 — 10y
0
first tell me, for CFrame.lookVector, can I type *3 or something for a Face of my choice? cos I saw in Wiki that FrontFace is number3 KAAK82 16 — 10y
0
No, lookVector returns the direction a CFrame is facing. If you want to return the CFrame of a face, you have to manually make a CFrame that does so TurboFusion 1821 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

I would try connecting the mesh to another part inside the tool, and also have a weld script attached to the tool so the mesh doesn't go flying off. If you want, you can link me the model, and I can do that for you.

0
no thnx, I decided to actually add a 2nd Part in this case, so now am having Problems with making the Part face some Focus Part from the Handles Position... I read the CFraming Sites and read one were I didnt understand wat Offset of something meant and to focus on a point also was confusing :/ KAAK82 16 — 10y

Answer this question