local BackPack = script.Parent.BackPack local Player = game.Players.LocalPlayer local Wheat = Player.leaderstats.Wheat local Storage = script.Parent.Storage.Value local Storage = "25" BackPack.Text = Player.leaderstats.Wheat.Value.."/"..Storage Wheat.Changed:Connect(function() BackPack.Text = Player.leaderstats.Wheat.Value.."/"..Storage end)
You could use an if statement to check the value of the collected wheat and if it's higher or the same as maximum storage, it won't allow you to collect anymore so..
If wheat.Amount.Value >= Storage then canCollect = false end