Badge Error; Badge Problem

I tested the gae and it has to show the badge reward thingy on the bottom right corner. And I will test it.

It didn’t work, sadly… Can you tell me any more ideas?

Well, that’s really weird, can I see where the location of the script is? You worded everything correctly

It is in ServerScriptService. What for?

sometimes, putting a script in the wrong place will stop the script from working. For example, the players mouse wont work with button1Down if it’s in the workspace. I don’t really know how to fix this, but you should try @RetributionVI’s answer.

Yes, I would put that there too

So where do I have to place it? Is it in the right spot?

Problem’s being overcomplicated.

The placement of your if statements matter. The first one is always going to evaluate to true if the player has 10 or more wins, so the other statements won’t evaluate. Reverse the order of evaluation with your original code and you’re done.

Remember to try others’ solutions before jumping to the conclusion that they don’t work unless you know for sure they won’t work.

Original solution:

I have tested your guys’s methods allot of times but at the end, it didn’t work out.

What’s the problem then? What does your code look like when you go to test it? When did badge giving work for you? Only saying it doesn’t work isn’t very helpful a response to help us understand what went wrong and where to go from to help rectify the issue.

If the issue is that you aren’t being awarded the badges, that’s because you created them. You cannot be reawarded a badge that you own.

The problem is that everytime when the player hits 10, 50, or 100, it doesn’t show the badge. And it shows no error at all. And I made another badge where when you touch a plate, on the bottom right it shows the badge award.

It’s not showing an error because the script is written correctly, it’s the order of evaluation that’s the problem. Please fulfill the rest of my requests, plus two extras:

  • What account(s) are you testing this from?
  • What does your code look like when you go out to test it?
  • When did badge giving work for you?

Also, what’s this new concept you’ve introduced about showing the badge award? Is that a custom implementation you added? That isn’t representative of whether the BadgeService actually awarded the badge or not.

You need to include more details when you reply. I still am unable to tell you that anything’s wrong other than the way you wrote your if statements without proper details to work off of.

Are you just checking once? Only when the player joins? At least that seems like what you’re doing.

Yes, it isn’t showing an error, but here is the rest of your ‘requests’

  1. I don’t understand what you mean by that. My main account? (this one)

2:

game.Players.PlayerAdded:Connect(function(plr)
	if plr:WaitForChild("PlayerStats").Wins.Value >= 100 then
		game:GetService("BadgeService"):AwardBadge(plr.UserId, 2124499200)
	elseif plr:WaitForChild("PlayerStats").Wins.Value >= 50 then
		game:GetService("BadgeService"):AwardBadge(plr.UserId, 2124499070)
	elseif plr:WaitForChild("PlayerStats").Wins.Value >= 10 then 
		if game:GetService("BadgeService"):IsLegal(2124499068) and not game:GetService("BadgeService"):IsDisabled(2124499068) then
    game:GetService("BadgeService"):AwardBadge(plr.UserId, 2124499068)
end
	end
end)
  1. I made a badge and an obby. When you completed the obby there is a neon brick at the end. I tested this in studio, and made allot of attempts and when I clicked the brick, the little UI at the bottom right corner that shows the badge image and text.

In your script, add plr.PlayerStats.Wins.Value and see if the actual Value that is being evaluated is correct.

Yes, I am doing that because the game.Players:PlayerAdded(function(). Is there a problem or am I missing something…?

Yeah, thats it. Check for either if it’s changed or a loop, your choice.

If you’re testing this from your main account, then again, you created the badges, so you won’t be awarded them either because badges are only awardable when it’s recognised that you do not own them. If you’re trying to award badges whenever a new stage is reached, just plug in a Changed event on Wins.

@jody7777, I have tried that many times. I rewritten my code all day, including the onr you just said. Maybe add a repeat wait()?

Don’t do wait(), something like wait(5) would suffice.

@colbert2677, so I should go on another account and do it? I will try it but I don’t know how I am gonna find the game.