Value is not a valid member of RBXScriptConnection

okay, so.
i created NumberValue on serverscriptservice script and put this inside every new player that joined game, and wrote this on other script:

local number = game.Players.PlayerAdded:Connect(function(plr)      plr:WaitForChild('bubbles')                   end)

then created other variable with this value:

local value = number.Value

and then, i got this:

Value is not a valid member of RBXScriptConnection

how to fix this? or im dumb

local number = nil

game.Players.PlayerAdded:Connect(function(plr)     
	number = plr:WaitForChild('bubbles')         
	
	print(number.Value)          
end)
2 Likes

This is an RBXScriptConnection. You aren’t referencing “bubbles”, but .PlayerAdded instead.

1 Like

oh my god, thank you so much!!

2 Likes