player = game.Players.LocalPlayer
mouse = player:GetMouse()
m = Instance.new("Message",player.Character) -- making it visible only to the player
m.Name = 'short'
game.Workspace.Model.Parent = m
mouse.Move:connect(function()
local x = math.floor(mouse.Hit.p.X) -- these make the grids
local y = math.floor(mouse.Hit.p.Y)
local z = math.floor(mouse.Hit.p.Z)
player.Character.short:WaitForChild("Model"):SetPrimaryPartCFrame(CFrame.new(Vector3.new(x,y,z)+Vector3.new(0,.5,0)))
end)
The above script moves a model in a one stud grid, but how do i move it in a 2 or 3 or 4 or 5 or 6 or 7 or 8 or anything i want stud grid? Multiplying or dividing or adding or subtracting the mouse.Hit just makes the model move in weird way, and still only 1 stud. So, my question to you, is how the heck do you move models in a more than one stud grid?
and btw, for anybody who downvotes, would you please leave a reason on the comments?
