Ad
Log in to vote
0

Why does it say that something is not a valid member of DataModel when it clearly is?

Asked by 12 days ago

I am trying to access a bool value from a script but it keeps giving me an error message saying :(Name) Is not a valid member of DataModel "games name"

(Name) is whatever the value's name is

Does anyone have any advice on what to do? the script is just

workspace:WaitForChild("MenuOpen")
Menu = workspace.MenuOpen

and then I try to turn it to false and it says the error

0
Can you please post the entire error code? Benbebop 949 — 12d
0
The error code is is in the name and the description yasquerda 0 — 12d
0
wait maybe you mean the number it isn't showing yasquerda 0 — 12d
0
I need the spesifics of the error. The stuff you provided is too vague. Copy and paste it direcly from the output. Benbebop 949 — 12d
View all comments (8 more)
0
  15:43:52.188 Menu is not a valid member of DataModel "Fish Tank Simulator"  -  Client  -  LocalScript:7 yasquerda 0 — 12d
0
Is Menu an already established variable? It seems to be trying to index it from the code above it. If not you need to add a "local" before it. Otherwise, replace "workspace.MenuOpen" with "workspace:WaitForChild("MenuOpen")". Benbebop 949 — 12d
0
Actually, forget that, I just remembered that :WaitForChild() requires a time as the second parameter. (Ex. ":WaitForChild('Part", 10)" or ":WaitForChild('Part", math.huge)") Benbebop 949 — 12d
0
well, i had found a error in it and it doesn't show the error but it still doesn't make it false this is my code script.Parent.MouseButton1Click:Connect(function() local Menu = workspace:WaitForChild("MenuOpen") Menu = false script.Parent.Visible = false end) yasquerda 0 — 12d
0
I worded that badly, i found the error and fixed it, but it does not change the value still yasquerda 0 — 12d
0
nvm i found the error where i couldn't change the value yasquerda 0 — 12d
0
thx for the help yasquerda 0 — 12d
0
Make sure to edit your post and add "[SOLVED]" to the title. Benbebop 949 — 12d

Answer this question