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)



4 comments

0

Can you include the script

0

oh my gosh so much math

0

why are you checking if a property that contains an event is nil

0

i where did i check if something was nil