I have 4 models in Workspace that are named something different, I want a script to look at all models in Workspace and see if they are named either of these and if so get removed. I am trying this
local mapmodel = game.Workspace:GetChildren()
if mapmodel.Name == "Ice Map" or "Fire Map" or "Rock Map" then
mapmodel:remove()
end
However in my test I am getting that :remove() is a nil value, what am I doing wrong here? Any pointers?
EDIT: This just occured to me, maybe I should rename "Ice Map" to
game.Workspace["Ice Map"]
?

2 comments
Updated my asnwer... Cheers
My updated script works for me. Does it not for u