How would I change this to make it say something else

Hello. This might be a dumb question, but I am not the best scripter, I am still learning as I mainly focused on building.

So I was watching a YouTube tutorial of how to make a simulator game work.

The tutorial is a simulator where you lift weights to gain strength. But for my simulator I wanted it to say “weight” or “size”.

Would I just change where it says “Strength” in this script to “Weight”? For example, instead of ‘StrengthData’ would I write ‘WeightData”?

I am pretty sure, yes. If an issue persists just reply to me.

1 Like

Yes. The first one you mentioned, the “weight” to “strength” is just a change of a string. A string is a piece of text and always created in lua by typing these signs " at the start and end.

The second one you’re talking about is a variable and the name of the variable doesn’t do that much, it’s just a way to identify the variable. What’s important is what the variable is set to, what comes after =

2 Likes

So I would write “WeightData”? And it would be fine?

You must change only one thing for this to work as a “Weight”.
In ur code there is probably this:

local strengthData = Instance.new("intValue")
strengthData.Name = "Strength"

so if u want to showoff “Weight” on leaderstats, then just change then strengthData.Name = “Weight”

1 Like

Yes, but you have to change the name of all strengthData to weightData.

You can easily do this by pressing Ctrl + F, typing in “strengthData” and type “weightData” in replace and then click replace all. This way it will switch the name for strengthData every time it was written.