Ok so I have this script that is supposed to rotate a model in the direction of where the player's moue clicked. It won't work because I can't get the model to rotate. Does anyone know how to make a model rotate?
c = game.Workspace.CurrentCamera.circle s = game.Workspace.Boat m.Button1Down:connect(function() if m.Hit == nil then return end c.Position = m.Hit.p s.Mid.Rotation = s.Mid.Rotation * CFrame.fromEulerAnglesXYZ(0, 90, 0) end) end)
This is in a LocalScript.
Try the following...
c = game.Workspace.CurrentCamera.circle s = game.Workspace.Boat m.Button1Down:connect(function() -- if m.Hit == nil then return end << you don't need this, Hit cannot be nil. c.Position = m.Hit.p s.Mid.CFrame = CFrame.new(s.Mid.CFrame.p, m.Hit.p) -- creates a CFrame of the position of "Mid", facing Hit end) end)