Hey,
So I need help I am trying to make a gui label where it will say "Bag - " after bag it will show how much you have in your bag then your max in your bag. I made a leaderstat were I need to connect it to the label. So when you gain 1 in your leaderstat you will gain 1 in the label to!
-My version of trying to make leaderstat the label https://gyazo.com/1e913f7346f479d0e96d511a0ff933eb
If you need any other info pls dm me on discord Little Masta#4713
You can use the Changed event of the IntValue you have in ReplicatedStorage to call the function everytime the value is changed.
Example:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Player = game:GetService("Players").LocalPlayer local Bag = Player.leaderstats.Bag local Storage = ReplicatedStorage:WaitForChild("Storage") Bag.Changed:Connect(function(newValue) -- The callback function is called everytime the Bag value changes and returns the new value of the Bag Player.PlayerGui.Labels.BagLabel.Text = newValue .. "/" .. Storage.Value end)
@metryy is it a local or a normal script? also were do i put it? in the BagLabel? Or SSS? etc
Closed as Non-Descriptive by Goulstem
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?