Hello everyone!
So I have a game, and I'm trying to make it so a player receives a badge when they have over 1,000 EXP.
Now I'm not good at scripting, but I tried to script it anyways. It didn't work.
Can someone help me with this, please?
local badgeId = 1390726909
local badgeService = game:GetService("BadgeService")
local function onEntered(player)
wait(5)
local hum = player:FindFirstChild("Humanoid")
if hum then
if player.leaderstats.EXP.Value<=1000 then
badgeService:AwardBadge(player.userId, badgeId)
end
end
end
game.Players.PlayerAdded:connect(onEntered)

3 comments
btw. :connect is depreciated. Use :Connect
Also, I advise you use datastores instead of leaderstats, but that's a bit more advanced.
Ok.