How do I reference userId????
sorry, It's a really long script but it does something specific. problem is on line 5/10
local badgeID = 2124476391
local bs = game:GetService("BadgeService")
local userId = Player.userId
local Knock = script.Parent.Knock
local a = script.Parent
while true do
wait(math.random(10,15))
Knock:Play()
bs:AwardBadge(userId,badgeID)
a.Material = "SmoothPlastic"
script.Parent.SurfaceLight.Brightness = 0
wait(.05)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.5
wait(.05)
a.Material = "SmoothPlastic"
script.Parent.SurfaceLight.Brightness = 0
wait(1.9)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.3
wait(.1)
script.Parent.SurfaceLight.Brightness = 0.6
wait(.1)
script.Parent.SurfaceLight.Brightness = 1
wait(.4)
a.Material = "SmoothPlastic"
wait(.05)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.5
wait(.05)
a.Material = "SmoothPlastic"
script.Parent.SurfaceLight.Brightness = 0
wait(1.5)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.3
wait(.1)
script.Parent.SurfaceLight.Brightness = 0.6
wait(.1)
script.Parent.SurfaceLight.Brightness = 1
wait(.5)
a.Material = "SmoothPlastic"
wait(.05)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.5
wait(.05)
a.Material = "SmoothPlastic"
script.Parent.SurfaceLight.Brightness = 0
wait(1.4)
a.Material = "Neon"
script.Parent.SurfaceLight.Brightness = 0.3
wait(.1)
script.Parent.SurfaceLight.Brightness = 0.6
wait(.1)
script.Parent.SurfaceLight.Brightness = 1
end

2 comments
This script lacks tonnes of stuff, what are you trying to do?
I'm trying to give a badge, ignore every line but 1, 2, 3, and 10. Those are the only ones that relate to the problem