I'm trying to make an NPC that can walk through parts, but not parts that are Diamond Plate.
if game.Workspace.moof.seeed.Material == "DiamondPlate" then --I don't have to put the then part because It's not the problem.
The issue is that the Material property is not a string
, it is an Enum
.
The reason this is hard to spot, is ROBLOX allows you to quickly assign Enum values with strings, however whenever checking them you cannot use this shortcut.
if game.Workspace.moof.seeed.Material == Enum.Material.DiamondPlate then