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

FindFirstChild is not a valid member of workspace error for no reason?

Asked by
fifayy 28
4 years ago

I was looking at a Region3 roblox scripting tutorial and when i was tryping the script i finished it then i clicked play it show the error of "FindFirstChild is not a valid member of workspace".

Here is my script

01local region = Region3.new(Vector3.new(5,0,5), Vector3.new(15,15,15))
02 
03local part = Instance.new("Part")
04part.Anchored = true
05part.Size = region.Size
06part.Parent = game.Workspace
07part.CanCollide = false
08part.Transparency = 0.9
09 
10 
11while true do
12    wait()
13    local thingsinRegion = workspace:FindPartsInRegion3(region, part, 1000)
14    for i, part in pairs (thingsinRegion)do
15        if part.Parent:findFirstchild("Humanoid") ~= nil then
16            print("Player found in the region")
17            local playername = part.Parent.Name
18        end
19    end
20end

2 answers

Log in to vote
0
Answered by 4 years ago

I'm not 100% sure, but in line 15, you used ':findFirstChild' when it should be ':FindFirstChild'.

Ad
Log in to vote
0
Answered by
Neatwyy 123
4 years ago

In line 15, you used :findFirstChild instead of :FindFirstChild.

Answer this question