Hello, im trying to make a minecraft script, everything was good but because of :MoveTo collisions every block spawns above other, how can i disable it? i tried disable can collide, but nothing happens
Server Script
for i,v in pairs(fl:GetChildren()) do if v.Type.Value == ty then local clone = v:Clone() clone.Parent = workspace for i,v in pairs(clone.bl:GetChildren()) do v.CanCollide = false end clone.bl.CanCollide = false clone:MoveTo(pos) for i,v in pairs(clone.bl:GetChildren()) do v.CanCollide = true end clone.bl.CanCollide = true end
Tool script
function CheckAndFire(t) -- 0,4,0 top | right -4,0,0 | left 4,0,0 | front 0,0,-4| down 0,-4,0| back 0,0,4 if t.Name == "top" then local pos = t.Parent.Position+Vector3.new(0,4,0) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end if t.Name == "right" then local pos = t.Parent.Position+Vector3.new(-4,0,0) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end if t.Name == "left" then local pos = t.Parent.Position+Vector3.new(4,0,0) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end if t.Name == "front" then local pos = t.Parent.Position+Vector3.new(0,0,-4) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end if t.Name == "down" then local pos = t.Parent.Position+Vector3.new(0,-4,0) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end if t.Name == "back" then local pos = t.Parent.Position+Vector3.new(0,0,4) game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end end BD.KeyR:Connect(function() if isEq then wait(0.1) local pos = BD.Point local tar = BD.Target if tar then if tar.Parent.Parent.Name == "MinecraftBlock" then bl.Value = true putblock = true tp.Value = blockUsing CheckAndFire(tar) else game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end else game:GetService("ServerStorage").BlockMake:Fire(blockUsing,pos) end end end)
also BD.KeyR is a fake event and BD is a table