its been called from module script that maintain the placement system in replicated storage:
local function onRenderStepped()
mousePosition = Get3dMousePosition(raycastParams)
if snapToGrid then mousePosition = PlacementValidator.SnapToGrid(mousePosition) end
local cframe = CFrame.new(mousePosition) * CFrame.fromEulerAnglesYXZ(0, math.rad(currentAngle), 0)
local size = if itemClone:IsA("Model") then itemClone:GetExtentsSize() else itemClone.Size
local isValid = PlacementValidator.IsValid(cframe, size)
boxOutline.SurfaceColor3 = if isValid then VALID_COLOR else INVALID_COLOR
itemClone:PivotTo(cframe)
end
I don’t know why it’s not working, I hope you understand that. i need to disable the collision between objects. as you said I have tried include that folder “WhitelistedToPlace” and “PlacedProducts”
PlacedProducts is the folder when the object is placed in its his parent(workspace).
WhitelistedToPlace is the folder that includes the placeable objects like shelf or something in my case that floor platform
I don’t know why it’s not working, I hope you understand that. i need to disable the collision between objects. as you said I have tried include that folder “WhitelistedToPlace” and “PlacedProducts”
PlacedProducts is the folder when the object is placed in its his parent(workspace).
WhitelistedToPlace is the folder that includes the placeable objects like shelf or something in my case that floor platform
i’m unable to write code for you right now but I can hopefully push you in the right direction
for the height limit, since you want specifically 3 objects to be placed on one another regardless of size, whenever you place an object, detect if it’s on top of 3 or more other objects, and if so, cancel the function.
you can use the same logic for collision, using WorldRoot:GetPartsInPart() the server can check if the part is in another object’s hitbox.