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

[blank] is not a valid member of workspace?

Asked by 2 years ago

Hi. I've made a script that when the ball (which you can push around) touches the green part, it makes the obstacle course that is invisible , become visible. This is the code.

local gPart = workspace.GreenPart
local sphere = workspace.Ball


gPart.Touched:Connect(function(touchingPart)

    if touchingPart.Name == "Ball" then

        for i, v in ipairs(workspace.Obby:GetChildren()) do

            if v:IsA("Part") then

                v.Transparency = 0
                v.CanCollide = true


            end

        end

    end

end)

What it tells me in the output: Obby is not a valid member of Workspace " Workspace "

Not sure how this is happening, but somehow the " Obby " model disappears when I click play?

If you can help, please do. I am a beginner scripter from the Philippines, and I'm looking forward to improving and getting better.

0
Are you sure that Obby is in the workspace? You could've placed it in a folder in the workspace or somewhere else SpiritualSonicdash 67 — 2y
0
Yes I am sure I placed it in the workspace. H4llowRain 21 — 2y
0
did you anchored the obby model? Puppynniko 1059 — 2y
0
I can't believe the solution was that simple. I appreciate your help Puppynniko H4llowRain 21 — 2y

Answer this question