How do I make this script realize I want to award a badge not some model?
01 | local badge = 2124515348 |
02 | game.Players.PlayerAdded:Connect( function (player) |
03 | if player.UserId = = 214710102 then |
04 | for i, v in pairs (game.Players:GetChildren()) do |
05 | if v:IsA( "Player" ) and not game:GetService( "BadgeService" ):UserHasBadge(v.UserId, badge) then |
06 | game:GetService( "BadgeService" ):AwardBadge(v.UserId, badge) |
When I try this it returns ' BadgeId '2124515348' is not of type Badge.'
Hi in the middle of posting this I figured out the problem, My badge has the same id as some model, look:
https://web.roblox.com/library/2124515348/SolidModel
https://web.roblox.com/badges/2124515348/You-met-the-owner
How can I fix the script to see that I am talking about the actual badge and not the model?