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

Not pointing towards the mouse?

Asked by 9 years ago

So I have a hopperbin that is equipped when I sit onto a seat, everytime I click I want the turret (which is a group of welded objects) to point towards the mouses X axis using this:

tw.C1 = (CFrame.new(sp.Origin.Value.Parent.MAIN.Position, Vector3.new(mouse.hit.p.x,sp.Origin.Value.Parent.MAIN.Position.y,mouse.hit.p.z))):inverse()

it moves the turret fine (this is only part of the code), but it doesn't point towards the mouse (if i click infront of the turret it'll point behind and vice versa).

I've been trying for 2 days to fix this, all of my posts in sub forum scripting helpers all get ignored (not even one reply from someone else, or someone replies that they'll help but never reply again). Please just fix it for me.

0
Check which side of the turret is the front face. My guess is that the barrels are on the back face. BlackJPI 2658 — 9y

Answer this question