local Players = game:GetService("Players")
local Bird = script.Parent:WaitForChild("Humanoid")
local BadgeService = game:GetService("BadgeService")
local BadgeID = 0 --I haven't made a badge yet
while true do
if Bird.Died then
local players = game:GetService("Players"):GetPlayers()
BadgeService:AwardBadge(players.UserID, BadgeID)
end
end
When I run this script it says: Argument 1 missing or nil - Server - Script:10 Stack Begin - Studio Script 'Workspace.FenceDimorphodon.Script', Line 10 - Studio - Script:10 Stack End - Studio
Why is it saying that? I'd really appreciate anyone who can help me!

2 comments
Thanks for the reply but now it says: Workspace.Dimorphodon.Script:9: invalid argument #1 to 'pairs' (table expected, got Instance). Did I do something wrong?
could you send the script/edit the one on your post to the new one?