Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

BackpackV is not a valid member of Folder?

Need help on line 4.

game.Players.PlayerAdded:Connect(function(plr)
	while wait() do
		wait(0.001)
		if plr.leaderstats:WaitForChild(game.ReplicatedStorage.Stats.Pack.Value).Value >= plr.BackpackShop.BackpackV.Value then
			plr.leaderstats:WaitForChild(game.ReplicatedStorage.Stats.Pack.Value).Value = plr.BackpackShop.BackpackV.Value
		end
	end
end)

1 answer

✓ Accepted answer

Hello, NoRainbowGT!

Let me know if this works. All I did was a add a WaitForChild

game.Players.PlayerAdded:Connect(function(plr)
    while wait() do
        wait(0.001)
        if plr.leaderstats:WaitForChild(game.ReplicatedStorage.Stats.Pack.Value).Value >= plr:WaitForChild("BackpackShop").BackpackV.Value then
            plr.leaderstats:WaitForChild(game.ReplicatedStorage.Stats.Pack.Value).Value = plr:WaitForChild("BackpackShop").BackpackV.Value
        end
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.