I'm making a ray casting gun with a :FindPartOnRayWithIgnoreList function and I want it to ignore objects that have CanCollide set to false.
Here is my code
local transparent
for i , v in pairs (workspace:GetChildren()) do
wait()
if v:IsA("Part") then
if v.CanCollide == false then
transparent = v
end
end
end
local part, pos = workspace:FindPartOnRayWithIgnoreList(ray{player.Character,transparent},false,false)
The problem is that the code only ignores one Non collide-able object. I want it to ignore all Non collide-able objects in the game.
