I am having trouble with this code
game.ServerStorage.ClickDetector:Clone().Parent = RainBB
RainBB.ClickDetector.MouseClick:Connect(function(player) local PlayerRain = player.leaderstats.Rain local PlayerRebirth = player.leaderstats.Rebirths local PlayerMulti = player.leaderstats.Multiplier PlayerRain.Value = PlayerRain.Value + 1 * (PlayerRebirth.Value) + 1 * (PlayerMulti.Value) RainBB:Destroy() wait() end) end
Basically, when you click the rain block, it will give you rain in your leaderstats. But for some reason, It is not multiplying with the rebirths and multiplier. I really need help with this in order to release my game. Thanks!
You need to use proper parentheses.
PlayerRain.Value = PlayerRain.Value + 1 * (PlayerRebirth.Value) + 1 * (PlayerMulti.Value) --should be PlayerRain.Value = (PlayerRain.Value + 1) * ((PlayerRebirth.Value) + 1) * (PlayerMulti.Value) --You gotta remember pemdas --Parentheses --Exponents --Muiltiplication --Division --Addition --Subtraction
You were trying to add +1 to rebirths and rain, but really what happened was you multiplied rebirths and rain by 1.