local plr = game.Players.LocalPlayer local money = plr.leaderstats.Money local effect = plr.leaderstats.Effect local price = 400 script.Parent.MouseButton1Click:connect(function() if plr.leaderstats.Money.Value > (price) then plr.leaderstats.Money.Value = money.Value -(price) plr.leaderstats.Effect.Value = 2 if plr.leaderstats.Effect.Value > 2 then wait (0.5) local epicfaces = Instance.new('ParticleEmitter') epicfaces.Parent = plr.Character.HumanoidRootPart epicfaces.Texture = 'rbxassetid://30327816' epicfaces.Rate = 3 epicfaces.VelocitySpread = 30 end end end)
The effect is supposed to show up in the character, it's in a LocalScript in a TextButton. Sadly, the effect on the leaderboard goes up, but the effect doesn't show up. I honestly don't understand why it wont show up, I'm not good at LUA, neither at building. (lol)
Well, the reason the particles do not appear is because of the conditional if statement. Take not that your 2nd if statement is WITHIN the first if statement, so anything in the 1st if statement may affect what happens in the 2nd one. For your 2nd one, you are checking to see if a value is greater than 2, however, in the line just before it, you set said value to be exactly 2. The script will see the value is 2 and will not continue to run, due to your if statement.
You can fix it by either removing line 9, or changing line 10. Whichever works in your preference.