CanQuery always set to true with Humanoids

Im making a block placing system, and one of the blocks that you can use to place is a dummy (with a humanoid).

The problem is that when I set can query for a humanoid model to off, it sets itself to true again.

Is it just me? If not, someone please help. Thanks!

1 Like

Can you show the code where you’re raycasting down to find the position?

i = mouse.Move:Connect(function()
		if part:IsA("BasePart") then
		part.Position = mouse.Hit.Position
		local X = math.round(part.Position.X)
		local Y = math.round(part.Position.Y) + 0.75
		local Z = math.round(part.Position.Z)

		if part.Size.Y % 2 ~= 0 --[[odd]] then
			X = math.round(part.Position.X) + 0.5
			Z = math.round(part.Position.Z) + 0.5

		if part.Position ~=,Y,Z) then
				part.Position =,Y+(part.Size.Y/2)- 1 --[[prevent stud rounding from messing things up]] ,Z)

		elseif part:IsA("Model") then
			local X = math.round(mouse.Hit.Position.X)
			local Y = math.round(mouse.Hit.Position.Y) + 0.75
			local Z = math.round(mouse.Hit.Position.Z)
			if part:GetExtentsSize().Y % 2 ~= 0 --[[odd]] then
				X = math.round(mouse.Hit.Position.X) + 0.5
				Z = math.round(mouse.Hit.Position.Z) + 0.5

			if part:GetPivot().Position ~=,Y,Z) then
				part:MoveTo(,Y+(part:GetExtentsSize().Y/2) - 1,Z))

/// can query setter

if part:IsA("BasePart") then
		part.CanCollide = false
		part.CanQuery = false
		part.Transparency = 0.5
		part.Anchored = true
		part.Name = "Ghost_"..part.Name
	elseif part:IsA("Model") then
		part.Name = "Ghost_"..part.Name
		for i, item in ipairs(part:GetDescendants()) do
			task.wait(0.015) -- wait time based off of amt of parts
			if item:IsA("BasePart") then
				item.CanCollide = false
				item.CanQuery = false
				item.Transparency = 0.5
				item.Anchored = true
	part.Parent = workspace.GhostParts = part
	gui.LoadImage.Visible = false
	script.Loading.Value = false 

I know this post was a while ago, but have you found a solution?

Adding the humanoid into the exclude list for the raycast.