I want to make that if the model does not get to the desk at least in some part, then something happens accordingly


I think you can see for yourself what the problem is and you understood it from the photo. Just in case, I’ll write: I want to make sure that if the model does not get to the desk at least in some part, then something happens accordingly

It may seem to you, well, what’s so difficult about that? The problem is that my Wallpaper was created like this(This is done for another system to work):


I was thinking that it is possible to create several conditionally “raycasts” from different points of the block and check if they fall on the same block, however, for the reason that you see in the photo, it seems to me that this will not work

heremy code now:

local mouse = game:GetService("Players").LocalPlayer:GetMouse();
wait(2)
local moveModel = game.ReplicatedStorage.Objects.Decorations["Motivational quote1"]:Clone()
moveModel.Parent = workspace
local RegionsBuild = game.Workspace.Building.WallFolder

mouse.TargetFilter = moveModel;

local Connection = mouse.Move:Connect(function()
	if mouse.Target then
		if mouse.Target.Parent == RegionsBuild then
			local unitRay = workspace.CurrentCamera:ScreenPointToRay(mouse.X, mouse.Y, 1)
			local ray = Ray.new(unitRay.Origin, unitRay.Direction * 1000)
			local hit, pos, normal = game:GetService("Workspace"):FindPartOnRay(ray, moveModel)
			moveModel:PivotTo(CFrame.new(pos, pos + normal * 15))
		end
	end
end)

I’m really idk, say me if u need more information.

Hey, Instead of relying on raycasting, you can use Region3 or BoundingBox checks. These methods allow you to detect whether any part of your model overlaps with a designated area.

1 Like