I am trying to make a turret that moves to the direction of where the player clicked. The turret is welded to the boat with C0 of (0,-1,0) and the boat moves as well.
When I tried this script:
script.Parent.Turret.Weld.C0 = CFrame.new(script.Parent.Turret.Weld.C0.Position,mouseClick.Position)
--Where mouseClick = mouse.Hit
The turret doesn’t move to the direction of where the mouse clicked but moves in another strange direction. However, when I tried this:
script.Parent.Turret.CFrame= CFrame.new(script.Parent.Turret.CFrame.Position,mouseClick.Position)
--Where mouseClick = mouse.Hit
The turret actually does move to the direction of where the mouse clicked but the whole boat moves with the turret. I want the turret to be ‘isolated’ from the boat while the turret moves to the direction of where the mouse clicked.
Any help can be appreciated!
Thanks
-Psvita65594