I have a script that loops around a folder containing a bunch of seats. I have a BoolValueinside of each seat that changes to true when someone is sitting in the seat and changes to nil when no-one is sitting there. The players get moved to the seat when they click a part with a ClickDetector which gets sent to the client. The value changes on the server. The script is supposed to change the value to true but for some reason it just gives me the error:
22:24:26.407 - FILLED is not a valid member of Script
The server script I am using is in a folder in a part within a ClickDetector.
It also prints 36 nil's right before the error.
local seat
script.Parent.MouseClick:Connect(function(plr)
for i, v in pairs(workspace.TP:GetChildren()) do
if v then
if v.FILLED.Value == nil then -- error line
v.FILLED.Value = true
seat = v
break
else
print(nil)
end
end
end
end)
This code was in a LocalScript but it gave the same error.
I am not looping around the script so I have no idea why this is happening.
Could this be a Roblox glitch?
Thanks for the help!

9 comments
Are you sure that everything is spelt correctly? And take a look at line 7 ;)
Thanks for line 7!
lol
Still did not work though even after I changed the code
Updated the code on S-H
One of the children of TP may be a script. Try filtering it out by ClassName.
ok
WORKED! Thanks. Although I already checked if there were any scripts there and there were none. I don
't care it works!