[SOLVED] Multiplier not hitting

My button now doesn’t work, please help me, any suggestions about Scripting Support is appriciated !

Video:

Scripts:

It could be this one:

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)
					player.Stats.Cash.Value = player.Stats.Cash.Value - config.Cost.Value -- removes cash
					player.Stats.Multiplier.Value = player.Stats.Multiplier.Value + config.Amount.Value
				end
			end
		end
	end
end)

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

Data script:

-- So first we will be making the stats..

local Data = game:GetService("DataStoreService"):GetDataStore("randomthingloldataxd") -- type somthing random in there

-- And check if player has joined the game

game.Players.PlayerAdded:Connect(function(plr)-- basically redirects you to the player here
	local s = Instance.new("Folder", plr)
	s.Name = "Stats" -- it will show ur cash n stuff in the leaderboard
	-- change if to stats if u want the cash to show on a gui (will show later how to make.)
	local cash = Instance.new("NumberValue",s) -- cash stat
	cash.Name = "Cash"
	cash.Value = 0
	local multi = Instance.new("NumberValue",s) -- multi stat
	multi.Name = "Multiplier"
	multi.Value = 1
	local reb = Instance.new("NumberValue",s) -- rebirth stat
	reb.Name = "Rebirth"
	reb.Value = 1

	local dataload = Data:GetAsync(tostring(plr.UserId))

	-- loading stats part
	
	if dataload then
		cash.Value = dataload [1]
		multi.Value = dataload [2]
		reb.Value = dataload [3]
	end
	
	while wait() do -- now the cash giver part
		cash.Value = cash.Value + (1*(multi.Value+0)) -- add *reb.Value if u want rebirths to multiply cash earnings
		print("The number of Cash is "..cash.Value)
		print("The number of Multiplier is "..multi.Value)
		print("The number of Rebirh is "..reb.Value)
	end
end)

-- now the saving part

game.Players.PlayerRemoving:Connect(function(plr)
	Data:SetAsync(tostring(plr.UserId),{
		plr.Stats.Cash.Value, -- if you use leaderstats then do plr.leaderstats.Cash.Value
		plr.Stats.Multiplier.Value,
		plr.Stats.Rebirth.Value
	})
end)


-- now we are done with the data part, now lets make the buttons

I figured it out the bug out of 1/2 now it’s time for the hardest part: The Rebirth Not Multiplying Multiplier.

Video:

ThE vIdEo Is BrOkEn.

Add prints to see where it stops working.

It’s already in there on the Data.

But the idea might be great.

But where ?

I was talking about the top two scripts.

Ok but please give me the line of the script.

Every single line after an if statement…?

Ok, but what name should we do about the print ?

print("Something else please you can just name it to whatever you want.")

Anything, like “Print1”, “Print2”, etc.

Print1, Print2 and many more after if ?

Yes.

Download the file please:

HelpMeToFixThisInsaneBugPleaseDontCareAboutTheMenuCareAboutTheScriptsAndTheButtonToFix.rbxl (64.4 KB)

I figured it out for 1/2, now it’s the hardest part: The Rebirth Not Multiplying Multiplier.

But i will not count as a solution.

I will count as a solution after i fixed all of those 2 bugs.

It’s fixed, i forgot that the script of it has this:

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)
					player.Stats.Cash.Value = player.Stats.Cash.Value - config.Cost.Value -- removes cash
					player.Stats.Multiplier.Value = player.Stats.Multiplier.Value + config.Amount.Value
				end
			end
		end
	end
end)

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

Instead of this:

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.Cash.Value >= config.Cost.Value then -- checks if player multi is more or equal to cost (in config))
					player.Stats.Multiplier.Value = player.Stats.Multiplier.Value + config.Amount.Value
					player.Stats.Cash.Value = player.Stats.Cash.Value - config.Cost.Value
				end
			end
		end
	end
end)

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

I’ve made the Cash before the Multiplier one. So it caused the bug appears.

And no, do i did not make the prints to where it stopped working.

Can you guys can help me ?

The problem i have is the Rebirth Not Multiplying The Multiplier.

This is probably one of the most hardest bug ever afterall…

Or it could be SO HARD that nobody, NOBODY could ever fix this bug.

Copy:
Please Help Me To Fix The Most Hardest Bug Ever Please Dont Care About The Menu Care About The Scripts And The Model Called Button Simulator And Click On Rebirth Not Multiplier The Bug Of It Is Fixed.rbxl (50.4 KB)

1 Like

Probably a flaw in your scripting…

Or it isn’t SO HARD that nobody, NOBODY could ever fix this bug.

Why this bug is too hard for me to fix…

1 Like

I decided to do 1 of the bug out of the 2 bugs…

Because more people will probably help me.

So go check my other topic !

Well, probably not, i just found it.