0

# How can i award players a badge whenever i am at their servers?

I want to make an script which whenever players enter the server i am or when i join their servers they will be award with a badge, the problem is that, it doens't works, there are no scripting errors as i checked, this is probabbly a FE problem i am having, and i also tried using both badges ID (The one from the library and the one from studio's Game Explorer). Here's the script i used:

BadgeID = 476095178
if p.userId == game.CreatorId then
for _,v in pairs(game.Players:GetPlayers()) do
end
elseif p.userId ~= game.CreatorId then
for _,c in pairs(game.Players:GetPlayers()) do
if c.userId == game.CreatorId then
break
end
end
end
end)


0

This should work:

badgeId= 476095178
function onPlayerEntered(player)
if string.lower(player.Name)==string.lower("Velege1") then
for _,a in pairs(game.Players:GetChildren()) do
if a.Name~= "Velege1" then