But you can link a string to a number using a table. For example:
STRENGTH_TABLE = {
Noob = 100,
Pro = 200,
God = 1000}
To retrieve the strength use:
strength = STRENGTH_TABLE[class.Value]
But you can link a string to a number using a table. For example:
STRENGTH_TABLE = {
Noob = 100,
Pro = 200,
God = 1000}
To retrieve the strength use:
strength = STRENGTH_TABLE[class.Value]
local MarketPlaceService = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder",player)
stats.Name = "leaderstats"
local Title = Instance.new("StringValue",stats)
Title.Name = "Status"
Title.Value = "Innocent"
local Streak = Instance.new("IntValue", stats)
Streak.Name = "Killstreak"
Streak.Value = 0
local Rep = Instance.new("NumberValue", player)
Rep.Name = "Reputation"
Rep.Value = 0
local Class = Instance.new("StringValue", stats)
Class.Name = "Class"
Class.Value = "F-Class"
local BestFusion = Instance.new("Folder", player)
BestFusion.Name = "BestFusion"
local bestFusionName = Instance.new("StringValue", stats)
bestFusionName.Name = "Fusion"
bestFusionName.Value = "None"
local bestFusionMult = Instance.new("IntValue", BestFusion)
bestFusionMult.Name = "FusionMulti"
bestFusionMult.Value = 1
local coins = Instance.new("NumberValue", player)
coins.Name = "Coins"
coins.Value = 0
local totalCoins = Instance.new("NumberValue", player)
totalCoins.Name = "TotalCoins"
totalCoins.Value = 0
local strength = Instance.new("NumberValue", player)
strength.Name = "Strength"
strength.Value = 0
local agility = Instance.new("NumberValue", player)
agility.Name = "Agility"
agility.Value = 0
local psp = Instance.new("NumberValue", player)
psp.Name = "Psp"
psp.Value = 0
local Mult = Instance.new("NumberValue", player)
Mult.Name = "Multi"
Mult.Value = 1
local eMult = Instance.new("NumberValue", player)
eMult.Name = "eMulti"
eMult.Value = 1
What meanings are you talking about?
You cannot convert a this string to a number. Remove this line:
Class.Value has to be a number, not “F-Class”.
I know that’s why I’m saying how can I fix this I don’t want to do this number value
Sorry again, I just don’t understand you, maybe the translator didn’t translate correctly.
Remove the line I mentioned on the previous post
What is the publication date? I don’t understand
Remove this line from your code.
Oops, I didn’t mean to write to you, but to another person who is helping.
In your script, you’re trying to multiply a string “F-Class” with a number. That doesn’t make sense.
You either change the value to a number or completely delete it.
Now I have deleted it and am left without a boost from classes. What should I do?
What can I change to what can I add I deleted
I want to continue to receive a multiplier from classes, help me do it
You should create a new numberValue called “ClassBoost” that you can get the value of and use in your script
I have it, well, as it is, I’m not exactly sure, but I’ll send it to you right now.
local classMults = {}
classMults.fClass = 2
classMults.eClass = 5
classMults.dClass = 20
classMults.cClass = 100
classMults.bClass = 500
classMults.aClass = 2500
classMults.sClass = 12500
classMults.ssClass = 150000
classMults.sssClass = 1500000
classMults.xClass = 30000000
classMults.yClass = 1000000000
classMults.zClass = 40000000000
classMults.xyzClass = 400000000000
return classMults
This script is in the server storage and this is a module script
Then make a NumberValue and change its value according to your classes using “if” statements. And that NumberValue should be the one used in your calculations