Hello,

So I would like to use this following script to make a NPC cancollide so it can walk into things. Here is the script I am using.

Thanks

local noclip = true 
char = game.Workspace.NPC

while true do -- Make sure someone is in game
	if noclip == true then
		for _,v in pairs(char:children()) do
			pcall(function()
				if v.className == "Part" then
					v.CanCollide = false
				end
			end)
		end
	end
	game:service("RunService").Stepped:wait()
end

It does not work in game but only works in studio.