I am making a sand box tycoon and i got the placement good except that when placing an item and it touches an all ready placed item, the item you are trying to place goes on top. I have the placed items in a folder named Placed and a folder for the item you are placing called Placing inside your Base. I want it to go in it or make it not go up. If you have any other thing that you think needs to go in please say and where it needs to go. This is what i have for the placement:
PlayerMouse.Move:connect(function() wait(0.01) local RustyDropper = Clone -- Change to the item name local ItemBottom = RustyDropper.Model.Bottom --Change to the item name local Parts = RustyDropper.Model:GetChildren() --Change to the item name if PlayerMouse.Target ~= nil then local PlayerMousePositions = PlayerMouse.Target.Position.y PlayerMousePositions = 14.1 if PlayerMouse.Target.Name == Player.Name .. "'s Base" then if PlayerMouse.Target.Owner.Value == Player.Name then if Moved == false then local PlayerMousePosition = PlayerMouse.Hit.x local PlayerMousePositionss = PlayerMouse.Hit.z local Pie = PlayerMousePositionss/2 local Pizza = PlayerMousePosition/2 local HotDog = math.floor(Pizza) local HotDog2 = math.floor(Pie) local p = Pie - HotDog local q = Pizza - HotDog2 local p3 = p * 2 local q3 = q * 2 local playerMousePositionsss = PlayerMousePosition - q3 local playerMousePositions =PlayerMousePositionss - p3 local PlayerMousePositionRounded = Vector3.new(playerMousePositions,14.1,playerMousePositionsss) Clone:MoveTo(PlayerMousePositionRounded) end end end end end)