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

12 comments

0

Can you please post the entire error code?

0

The error code is is in the name and the description

0

wait maybe you mean the number it isn't showing

0

I need the spesifics of the error. The stuff you provided is too vague. Copy and paste it direcly from the output.

0

  15:43:52.188 Menu is not a valid member of DataModel "Fish Tank Simulator"  -  Client  -  LocalScript:7

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")".

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)")

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)

0

I worded that badly, i found the error and fixed it, but it does not change the value still

0

nvm i found the error where i couldn't change the value

0

thx for the help

0

Make sure to edit your post and add "[SOLVED]" to the title.