About using a value from a function to be shown into a textlabel

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    well i have a system where when i walk upto the egg it shows me the value in the textlabel
    but i want to be able to see the textlabel value without it being called by going to the egg

  2. What is the issue? Include screenshots / videos if possible!
    well when i try call it without the function it returns a error about it should be a number where as it is

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i’ve tried googling it, and looking on the fourms, but i haven’t been able to solve it, currently its still being called when approaching the egg
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local chance = FormatNumber.Format(EggsConfig.GetHatchChance(egg, pet, StateManager.GetData()))
	template.Chance.Text = chance.."%"
	template.Rarity.Text = eggConfig.Pets[pet].Rarity
	
	local LuckTextLabel = PlayerGui:WaitForChild("Left").StatsFrame.LuckFrame.Amount
	LuckTextLabel.Text = "Luck x"..chance

this is the part where when approached it changes the textlabel