Hey, I was creating a Placement System and was designing my Rotation System so you can rotate things, and I wondered to put the placement system to the mouse position, It works good, but the problem is that it keeps going to the camera, Like the part goes to the mouse position and after that it just tweens to the camera’s position, like the camera is a part.
yeah i know, thats why i said do targetfilter if it has collision enabled since it’s easier to just disable CanQuery especially if you want to targetfilter something else
You can try this piece of code from my placement system:
local function SnapOnTop(Y, Target)
--Snap on top of parts
assert(CurrentBlock, ERROR_MESSAGE_NO_ACTIVATION)
local YPos = Y
if not Target then
--If it has no target then use the old version
YPos = Y
--print(Y)
else
YPos += Target.Position.Y + Target.Size.Y / 2 --+ CurrentBlock.PrimaryPart.Size.Y / 2
--YPos += Target.Size.Y
end
--print(Target)
return YPos
end
Y is the origin position(0.5), Target is the part the mouse is on.