Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this multiplication thing in my script? Is it possible?

Asked by 2 years ago

So im trying to make it so when you reach a certain amount of Strength you level up

But I want the needed amount of strength to double everytime

example:

I need 200 strength to level up and once I do level up it goes to 400, then i hit 400 then it goes to 800

Instead it is just going up 100 everytime.

(The script multiplication is ruined right now since I have been playing around with the script for an hour straight)

Script: (Only focus on line 3)

local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
    if (plr.leaderstats.Level.Value*100) +100 <= plr.leaderstats.Strength.Value then
        workspace.Events.Level:FireServer()
    end
end)

Answer this question