I have made a gui for a simulator backpack (just like the one in mining sim and bubblegum sim) and I don't know how to make the script for it, but I have made an attempt. Can somebody please help me?

Edit: I want this script to update the gui every wait() so that it changes to the "cs / 10"

script directory is in game.StarterGui.Backpack.Frame.TextLabel

local plr = game.Players.LocalPlayer
local cs = plr.leaderstats.Chemicals.Value

while wait() do
	script.Parent.Text = "??"..cs.."/ 10"
end

6 comments

0
0

but the default wait is 0.0291 and thats what i need

0

In order to do this we need to weld some parts to the characters torso. What I can tell you how to do this is by creating a model and then cloning and welding it onto the player once the player's character is added. However you have to script this yourself. I've done this before and I can verify that this method works.

1

I recommend using the Changed event instead; with a loop, it's going to keep firing over and over again constantly, like you said, every 1/30th of a second, vs where the Changed event will fire every time the value changes.

0

wdym weld? did u accidentally click on the wrong question? this is about backpack gui, like bubblegum sim

0

I recommend using events instead of an infinite loop