I'm trying to give a badge every time this function fires. I have one script and one localscript. It does not give me any indication of anything happening. I've been trying to fix this for a week now and I've practically given up.
Here is the script:
local Knock = script.Parent.Knock local a = script.Parent local knockbadgeEvent = game.ServerStorage.knockbadge while true do wait(math.random(5,6)) knockbadgeEvent:FireAllClients() Knock:Play() 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
And here is the localscript:
local badgeID = 2124476391 local bs = game:GetService("BadgeService") local function onknockbadgeFired() bs:AwardBadge(player.UserId, badgeID) end
I've tried defining player as game.Players.LocalPlayer
but that doesn't work either!