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

Why does it say that readyburger is not a valid member of workspace?

Asked by 3 years ago

My script is when an npc named "Cook2" steps on a part a burger appears, but it says that readyburger is not a valid member of workspace even though it it.

local rb = game.Workspace:FindFirstChild("ReadyBurger")
if rb then
    script.Parent.Touched:Connect(function(hit)
        if hit.Parent.Name == "Cook2" then
            game.Workspace.ReadyBurger.Transparency = 0
        end
    end)
end
0
Try checking if you have written model's name correctly. MysteriousCeburek 27 — 3y
0
I fixed it AnimatedSL -3 — 3y
0
if you fixed it add [Solved] to your title Fifkee 2017 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Not a Valid Member of Workspace means that it either doesn't exist or it has been moved. Make sure the part's parent is workspace or game.Workspace. Also make sure you written the name correctly.

Ad

Answer this question