[SOLVED] Rebirth not multiplying Multiplier

Hello guys i have this issue for a while, the Rebirth Stat not multiplying the Multiplier…

Normally, the rebirth gives doesn’t give the same amount after he got to a certain amount of Value…


Videos:

Most reviwed video…
Shortest video.

Medium type of the reviewed video…
Where it started to lag alot

Less reviewed video but laggy.
Longest video…


Those were 3 videos and i had to cut it out or else this will took over 15 MB and the video wouldn’t be able to be visible and it will make an error.

So this is why i cutted it out.


Script:

local config = script.Parent.Config -- now lets change it so it's for rebirths by making it reseting the multi and cash at the same time !
script.Parent.Part.Touched:Connect(function(hit) -- this is when player touches button (with characther)
	if hit.Parent:FindFirstChildOfClass("Humanoid") then
		if game.Players:GetPlayerFromCharacter(hit.Parent) then
			local player = game.Players:GetPlayerFromCharacter(hit.Parent)
			if player:FindFirstChild("Stats") and player.Stats:FindFirstChild("Rebirth") then
				if player.Stats.Multiplier.Value >= config.Cost.Value then -- checks if player multi is more or equal to cost (in config)
					print("You got "..config.Amount.Value.." Rebirth and you Rebirthed, so you lost "..player.Stats.Cash.Value.." Cash and lost "..player.Stats.Multiplier.Value.."-1 Multiplier") -- There's also an small issue but i fixed it because there's "player.Stats.Multiplier.Value.."-1 Multiplier"" in it
					player.Stats.Cash.Value = 0
					player.Stats.Multiplier.Value = 1
					player.Stats.Rebirth.Value = player.Stats.Rebirth.Value + config.Amount.Value
				end
			end
		end
	end
end)

script.Parent.Part.GUI.TextLabel.Text = "x"..config.Cost.Value.." = "..config.Amount.Value.." Rebirths"

So yeah help me please and any help is appreciated…


what is causing the lag? if you have some while true loop without cooldown, that’s why it will lag after some time, and since we don’t know how you made it, it’s impossible to help

about the multiplier, it would be a nice idea if you showed to us how you handled [maths] with rebirths and multipliers, common mistakes using maths are the real pain most of the time

but i still believe that the main issue is (the loop that gives cash)

It’s not the bug that gives the cash…

It’s on the rebirth but it doesn’t multiply the Multiplier instead it’s just giving 1 Multiplier instead of (Number of Multiplier)…

It’s automatic…

What does this even mean ?

i dont understand anything about the script

i understand now, you didnt set a script wherre it multiplies the value if you rebirth

--// Settings \\ --

local Multi = 1 -- Set how much multiplier to multy your Multiplier Value
local MultiplierNeeded = 250 -- How much you need to rebirth
local AmountRebirth = 0 -- How much the player rebirthed

--// Script \\--

script.Parent.Touched:Connect(function(Touch) -- Calls a function when something is touching the part
	local Plr = game.Players:GetPlayerFromCharacter(Touch.Parent) -- gets the player
	if Plr then -- if the variable Player is true (if the variable is nil then its false and if its not nil then its true)
		--// Variable \\--
		local Multiplier = Plr.leaderstats.Multiplier -- gets the multiplier Value
		local Rebirth = Plr.leaderstats.Rebirths
		-- End of variables --
		Multi = Multi + 1
		MultiplierNeeded = MultiplierNeeded * 2
		AmountRebirth = AmountRebirth + 1
		Multiplier.Value = 1 -- Sets the value to 1
		Rebirth.Value = AmountRebirth -- sets the value to whatever is the AmountRebirth
	end
end)

Didn’t resetted the multiplier

what do you mean by that soihpiuoshpiush

The stat called Multiplier didn’t resetted…

btw you need to put where is your rebirth or multiplier values are dont copy the script same as me

It’s actually plr.Stats.Multiplier.Value

i put leaderstats because when iw as testing i was doing plr.leaderstats

Oh okay but please give me a real script to fix the issue…

sorry i cant talk in this anymore

I don’t quite understand the issue, your topic is (what I believe) saying that when you’re rebirthing, the multiplier didn’t get multiplied, but in a few posts you said something about resetting the multiplier

I know but this is a Scripting Support, i watched a tutorial to make this…

search on youtube how to multiply multiplier

Not a bad idea, let me search it…

But unfortunately, i found nothing, sorry…

It broke…

20:02:30.296 Touched is not a valid member of Model “Workspace.Button Simulator.Rebirth” - Server - ButtonHandler:9
20:02:30.296 Script ‘Workspace.Button Simulator.Rebirth.ButtonHandler’, Line 9 - Studio - ButtonHandler:9