Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Why doesn't this script remove a model from workspace?

Asked by 10 years ago
    if MapData.Value == 0 then
    if game.Workspace.MinatureCrossRoadsChris == nil then
    wait(1)
    print("It really is equal to nil.")
    else
        game.Workspace.MinatureCrossRoadsChris:Destroy()
    end
    end

MinatureCrossRoadsChris is basically not in the workspace but i want it to check and if MinatureCrossRoadsChris(the model) is in Workspace then it will remove that model. Why isn't it even working? It's so simple, ugh. ERROR: MinatureCrossRoadsChris is not a member of Workspace.

EDIT: Problem is fixed. I used FindFirstChild, so easy darn it.

Answer this question