player = game.Players.LocalPlayer mouse = player:GetMouse() m = Instance.new("Message",player.Character) m.Name = 'short' game.Workspace.Model.Parent = m mouse.Move:connect(function() player.Character.short:WaitForChild("Model"):SetPrimaryPartCFrame(mouse.Hit) end)
this script makes a model move wherever the mouse is pointing, the only problem is that the model is rotated in accordance to the players camera, try it out and see what i mean. So how do i have the model be not weirdly rotated?
player.Character.short:WaitForChild("Model"):SetPrimaryPartCFrame(mouse.Hit)
This line of code sets the model's (primary part's) CFrame. That means both position and rotation. If you want to set only position, try SetPrimaryPartCFrame(CFrame.new(mouse.Hit.p))
. It'll create a new CFrame with no rotation.