I've used it plenty of times and I understand how it works to an extent. But for some reason this time around, the model isn't moving at all. The bounding boxes are working fine around the models and change colours when i'm out of range etc... So that shows that the mouse position is fine.
I've even compared this to another script I made based on moving models and for some reason this time around it just won't move the model for me.
I've left the insert function below from my script that deals with the model following the mouse, thanks for any help.
function Insert()
if Clicked == true then return end
Clicked = true
Placed = false
local InsertedObject = game.ServerStorage.Model
InsertedObject:Clone().Parent = game.Workspace
InsertedObject.PrimaryPart = InsertedObject.Tile
local SB = Instance.new("SelectionBox", Player.PlayerGui)
SB.Color = BrickColor.new("Teal")
SB.Name = "Place"
SB.Adornee = InsertedObject.Tile
while Placed == false do
wait()
if (Mouse.Hit.p - Player.Character.Torso.Position).magnitude <= 100 then
if InsertedObject.Tile.Position.Y == Spawn.Position.Y+1 then
SB.Color = BrickColor.new("Lime green")
else
SB.Color = BrickColor.new("Grey")
end
InsertedObject:MoveTo(Vector3.new((Mouse.Hit.p.X+12.5) - (Mouse.Hit.p.X+12.5)%25, Spawn.Position.Y+19, (Mouse.Hit.p.Z+12.5) - (Mouse.Hit.p.Z+12.5)%25))
else
SB.Color = BrickColor.new("Lime green")
end
end
end

4 comments
Errors?
None at all
I don't understand the problem. Is it not moving at all?
The model that contains bricks is supposed to follow the mouse. But it's not.