I searched all over internet but can't find why my script doesn't work. I want to create a wall wich only Players can walk through and nothing else. so i created in starterplayerscripts a localscript with:
game.Workspace.noPassZombiewall.CanCollide = false
but if i try this out when i press run game in robloxstudio, npc's walk right through. if i try it in a server in roblox studio they dont walk through, but at some point still do. what am i doing wrong?
You can try to put a script inside of the wall, then use this code:
local wall = script.Parent game.Players.PlayerAdded:Connect(function(player) if player then wall.CanCollide = false else wall.CanCollide = true end end)
Hope this works for you!