By the way, this is a local script.
local player = game.Players.LocalPlayer local Plus = player.PlayerGui.PlusMaterialNotification player.leaderstats.Steel.Changed:Connect(function() local tab = Plus:GetChildren() local random = math.random(1,#tab) local selected = tab[random] print("e") selected.Text = "+5 Steel" wait(1.3) selected.Text = "" end) player.leaderstats.Wood.Changed:Connect(function() local tab = Plus:GetChildren() local random = math.random(1,#tab) local selected = tab[random] print("e") selected.Text = "+5 Wood" wait(1.3) selected.Text = "" end) player.leaderstats.Stone.Changed:Connect(function() local tab = Plus:GetChildren() local random = math.random(1,#tab) print("e") local selected = tab[random] selected.Text = "+5 Stone" wait(1.3) selected.Text = "" end)
Whenever I run the script, I get this error: leaderstats is not a valid member of Player "Players.Manby7" Any help would be greatly appreciated!
Try: player:WaitForChild("leaderstats")
The folder may not have loaded.