Hello, I’m working on a game with GUI’s and tried to script something, but it gives me the error “Attempt to index nil with ‘Value’”

This is my script:
local c = script.CLIENT:GetChildren()
c.Value.Value = "Welcome."
c.Parent = game.Players[player.Name].PlayerGui.HUB
From the function, I have game.Players.PlayerAdded:Connect(function(player).
Can you post the full code. The snippet is a little misleading to follow.
game.Players.PlayerAdded:Connect(function(player)
local c = script.CLIENT:GetChildren()
c.Value.Value = "Welcome."
c.Parent = game.Players[player.Name].PlayerGui.HUB
end)
You can’t change a property for all instances inside of an array like that. You have to iterate over the array.
Also, you do not need to access game.Players twice to retreive the player’s instance because the player variable passed onto your PlayerAdded function will be that.
game.Players.PlayerAdded:Connect(function(player)
local c = script.CLIENT:GetChildren()
for i, v in pairs(c) do
v.Value.Value = "Welcome."
v.Parent = player.PlayerGui.Hub
end
end)
Oh my god, I literally found the issue. I did :GetChildren instead of :Clone().
OH! Alright. That would probably make a lot more sense.
Yeah, thank you for your time though.