Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a welded object look at a certain position?

Lets say I have a turret and the weld does not have any certain CFrame, it is welded directly to a part (turretbase).

I want the weld to "look at" my mouse.Hit, how would I do this?

I tried...

C0 = CFrame.new(turretbase.CFrame.p,mouse.Hit.p)

...it spazzed.

1 answer

A friend answered this for me,

C0 = part0.CFrame:inverse()
C1 = CFrame.new(part0.CFrame.p,hit.p)

This discussion is preserved as it was. New answers, comments, and votes are closed.