GameInProgress is not a valid member of Script "ReplicatedStorage.Game"

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GameInProgress = game.ReplicatedStorage.Game.GameInProgress

The error is on the second line it says

 GameInProgress is not a valid member of Script "ReplicatedStorage.Game"


local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GameInProgress = game.ReplicatedStorage.Game:WaitForChild("GameInProgress")

If It Says That A Object Is Not A Valid Member Of Something Then Just Use :WaitForChild("ObjectName")

It Solves All But If It Still Errors Its Cause Of Name Spelling Or Something Else

Check If It Gets Deleted When You Play The Game
Also Check In Server View

1 Like

Note when i do this from a server script it works
local alue = game:GetService(“ReplicatedStorage”):WaitForChild(“Game”).GameInProgress

then just do that it would work then

now it just does
GameInProgress is not a valid member of Script "ReplicatedStorage.Game

are you testing from a local script?

im running the code on the local script

OHHHH no wonder it didnt worked

using remote events may I GUESS work or object values

wait why wont it work on local script

well it does happen like i tried to make chat tags and showed me same error i (i was using local script) and had to use server scripts to do it

Not to be picky, but why are you defining the ReplicatedStorage variable, but not using it? It wouldn’t make sense to not use it when instead you could just do

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GameInProgress = ReplicatedStorage:WaitForChild("Game"):WaitForChild("GameInProgress")

Looking at the error, it looks like the script is trying to find the GameInProgress Value in the script alone…? Judging by where the script exactly is, it looks like it’s parented to the PlayerGui as a LocalScript? It could just also be due to the fact that the client is still attempting to load everything properly

1 Like

You can’t define local ReplicatedStorage = game:GetService("ReplicatedStorage") and
local GameInProgress = game.ReplicatedStorage.Game.GameInProgress from a localscript, you can from a serverscript though, a localscript is part of the avatars clients end, such as spawning from a certain character model, etc.



1 Like

You can’t just say, ohhh replicatedstorage from a localscript, you’d need to have a ServerScript connected to the localscript to send data between the two.


I still don’t understand

You can still reference the ReplicatedStorage's descendants from a LocalScript regardless, you don’t need to connect them through both sides of the game (As that would require RemoteEvents)


Even using the code in the original post works completely fine, so it has to do something with his side


lol i put two thins called “GAME” in replicatedstorage accident