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.
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
^ What the..Who talks like that.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Yeah should work... is seed supposed to have three es?
Should work... Just check to make sure the names are correct, just in case.