Having multiple bases for placement

True, but the real reason why RenderStepped has a dedicated sync function is because it’s meant for updating Positions of objects. I highly doubt he’d be using other functions binded to the same event that will manipulate the same piece of furniture, so there is no particular reason to sync it with anything.

You only need to sync them if firing one function before the other will cause bugs.

This makes it a bit more complex, you’ll have to place all objects that aren’t walls into the ignore list.

That arent walls???

Correct such as the floor truely you just need to ignore the:
Table,
Floor,
Character
Unless if he means something else of course.


It doesnt print anything now, but the table can still go thru walls

Actually, a lot more. Anything that hasn’t got “Wall” in its name.
Just add string.find(HitPart.Name,“Wall”) into the if statement.

Yes but the issue with that is that if you place other furniture then you can end up placing furniture inside of furniture.

That’s because you’ll have to check if anything is inside the furniture model with workspace:FindPartInRegion3WithIgnoreList().

Ah, also I didn’t even realize that was a function I wish I knew that earlier. It’s probably faster then ray casting but not 100% sure.

Would it just be

workspace:FindPartInRegion3WithIgnoreList(ItemClone.PrimaryPart, ignl)

??

It is, but he still has to check if a wall blocks his vision. His original implementation allowed him to place outside the building.

Most likely, yes.
More chars required.

Yeah I saw the reasoning for ray casting to prevent things from being placed outside I was thinking that you guys were going to use ray casting as well to detect if it’s touching a wall. My bad,

I kinda did, the only problem is that I forgot that the thing had volume, not just a position.

local lasthit = nil
	RenderStepped = RunService.RenderStepped:Connect(function()
		local ignl = {player.Character,PlayersPlot.Base, ItemClone, PlayersPlot.House}
		local p0,p1 = player.Character.Head.Position, mouse.Hit.Position
		local dir = p1-p0
		dir = dir+dir.Unit*0.2
		local ray = Ray.new(p0,dir)
		
		local HitPart = workspace:FindPartOnRayWithIgnoreList(ray,ignl)
		
		if not HitPart then
			if workspace:FindPartInRegion3WithIgnoreList(ItemClone.PrimaryPart, ignl) then --ERROR
				RenderPosition(PlayersPlot, mouse.Hit.p, ItemClone, LowerX, UpperX, LowerZ, UpperZ)
			end
		elseif HitPart~=lasthit then
			lasthit = HitPart; print(HitPart.Name)
		end
	end)

Error
[FindPartInRegion3WithIgnoreList is not a valid member of Workspace]

workspace:FindPartsInRegion3WithIgnoreList(region3, ignoreList, maxParts)
You were missing an “s” from FindPartsInRegion3WithIgnoreList

BTW, the first argument has to be a Region3.
local positon, size = mouse.Position, hitbox.Size
local region = Region3.new(position-size/2,position+size/2)
workspace:FindPartsInRegion3WithIgnoreList(region,ignl)

[Position is not a valid member of PlayerMouse]

mouse.Hit.Position
CHARS CHARS

Try Mouse.Hit.p
As the position is not exactly value of PlayerMouse but Hit is which is a CFrame value of where the mouse is pointed at.