Hello. So I’m making basic turret movment. So I have welded turret part. So I want it to move on Y axis based on MousePosition, also I tried moving it with C0 = CFrame.new,etc but it still moves the whole model.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Weld = game.Workspace.Tank.Vehicle.Turret.MainMove.Weld.C0
while wait() do
local unit = (mouse.Hit.Position-Weld.Position).Unit
local cross = unit:Cross(Vector3.new(0,1,0))
Weld = CFrame.fromMatrix(Weld.Position,cross, Vector3.new(0,1,0))
end
This is the script that I am using.