maybe one that detects if four sides are touching, i want to make an infinite baseplate script that uses cframe to clone the baseplates when they are stepped on. i want to stop them from overlapping because when i step on the baseplate i just left the one made by the new baseplate clones itself.
baseplate= script.Parent function copy(part) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z+100) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X, baseplate.CFrame.Y, baseplate.CFrame.Z+100) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z-100) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z+100) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X, baseplate.CFrame.Y, baseplate.CFrame.Z-100) baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z-100) ``if baseplate.Touched then script:Destroy() end end baseplate= script.Parent baseplate.Touched:connect (copy) -- i also tried baseplate= script.Parent function copy(part) local ray = Ray.new(Vector3.new(100,0,100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z+100) local ray = Ray.new(Vector3.new(100,0,0)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z) local ray = Ray.new(Vector3.new(0,0,100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X, baseplate.CFrame.Y, baseplate.CFrame.Z+100) local ray = Ray.new(Vector3.new(0,0,-100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X+100, baseplate.CFrame.Y, baseplate.CFrame.Z-100) local ray = Ray.new(Vector3.new(-100,0,100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z+100) local ray = Ray.new(Vector3.new(-100,0,0)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z) local ray = Ray.new(Vector3.new(0,0,-100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X, baseplate.CFrame.Y, baseplate.CFrame.Z-100) local ray = Ray.new(Vector3.new(-100,0,-100)) local part, endPoint = workspace:FindPartOnRay(ray) if part then part:destroy() end baseplate = script.Parent:Clone() baseplate.Parent = game.Workspace baseplate.CFrame = CFrame.new(baseplate.CFrame.X-100, baseplate.CFrame.Y, baseplate.CFrame.Z-100) if baseplate.Touched then script:Destroy() end end baseplate= script.Parent baseplate.Touched:connect (copy)