hi can someone help me with my script becuz the badge is not giving it to a player and i think im doing my script wrong also there is no error in the script and im also new to scripting so yeah. yes i already tried looking at some tutorials in yt and devhub
local bID=0000000000 -- it has id i just put it as 00000 lol
local bs=game:GetService('BadgeService')
while wait() do
if game.Workspace.CurrentCamera ~= game.Workspace:WaitForChild("RingCamera") then
script.Parent.GiveGui.MainGui.Blind.Visible = true
else
script.Parent.GiveGui.MainGui.Blind.Visible = false
end
end
script.Parent:Connect(function(player)
bs:AwardBadge(player, bID)
end)
Oh I see. You’ll have to utilise RemoteEvents as you can’t award badges from the client.
Insert a RemoteEvent into ReplicatedStorage.
local remote = game.ReplicatedStorage.RemoteEvent
local blind = -- Path of the blind here
blind.Changed:Connect(function()
if blind.Visible == false then
remote:FireServer()
end
end)
Insert a Script in ServerScriptService:
local badgeService = game:GetService("BadgeService")
local remote = game.ReplicatedStorage.RemoteEvent
local badgeId = -- Your badge ID here
remote.OnServerEvent:Connect(function(player)
badgeService:AwardBadge(player.UserId, badgeId)
end)