Roblox still giving badge even when script is deleted

Odd. I used a while true do script right now in workspace, deleted it from serverside, and it still was firing. Might be a roblox issue.

why would I shut down the servers, on my game right now when I didnt change anything, it has 235 people in it.

One question, is the script in the map which is cloned from not disabled? That might be the cause.

Are you sure it was server side, remember Studio defaults to the client.

Yes, I changed to server and it still fired.

the map is cloned, waits until it finishes, and then it gets destroyed, but the badge still gets awarded.

What I mean is did you shut them down since the update since Roblox doesn’t update old server code.

I didnt update anything about the badges.

Im gonna just made a server script for the badges, called badge handler and have a table with all the maps and their badges, and then when it sees that map is out it will give the badge out.

Can you disable the script inside the map where its cloned from, then add a another line that undisables the script once its cloned in?

Scripts fire inside ServerStorage, so that might be a issue.

They don’t, they fire in ServerScriptService.

scripts dont work in server storage, lol. server scripts only work in, workspace, serverscriptservice and thats it.

Still worth a try, you never know

Script s will not run when they are parented to ServerStorage, although ModuleScript s contained within can be accessed and ran. It is recommended developers use ServerScriptService to hold Script s they wish the server to execute.

Honestly, you shouldn’t rely on Destroy to stop the badge giver. Try using something like break.

Why? It says Destroy does this, so there is no reason to do some complicated system to do the same.

Try destroying the script itself before the parent. People have had similar issues with destroying the parent but the script inside still running.

This was fixed, there was an issue with connections not disconnecting but this was fixed.

I have fixed it by making a script to handle the badge giving.



local Badges = {
	["Beanos"] = 2124641173,
	["Baby Yoda"] = 2124743111,
	["Back 2 The Future"] = 2124768269,
	["This is patrick"] = 2124724717,
	["Mayonaise on an escalator"] = 2124767501,
	["Shrunken"] = 2124692110,
	["Obama"] = 2124747038,
	["Steamed Hams"] = 2124735457,
	["Ballistic"] = 2124747047,
	["Carl and Shaggy doing the macarena"] = 2124754848,
	["Morshu"] = 2124724702,
	["The Duck Song"] = 2124738756,
	["Best Pirate I've Ever Seen"] = 2124747054,
	["Flying Lawnmower"] = 2124738755,
	["Little Einsteins"] = 2124724700,
	["Fortnite"] = 2124744110,
	["BUGER KING FOOT LETTUCE"] = 2124638993,
	["Godzilla's Dance"] = 2124638987,
	["Jaws"] = 2124633798,
	["Big Ben Girl"] = 2124641491,
	["iCarly"] = 2124647068,
	["Teh Roblox Song"] = 2124677502,
	["The Noob Song"] = 2124638995,
	["HELLO THERE"] = 2124641494,
	["Titanic"] = 2124634694,
	["POKEMON GO"] = 2124633101,
	["Harambe"] = 2124698396,
	["Olga"] = 2124641488,
	["Nyan Cat!"] = 2124675600,
	["Flamingo"] = 2124634039,
	["Cop Dude"] = 2124675595,
	["Samuel"] = 2124633500,
	["Moto Moto"] = 2124629109,
	["Shark Pog"] = 2124698361,
	["Im A Sheep"] = 2124620159,
	["Mickey Mouse Clubhouse"] = 2124617703,
	["Mining Away"] = 2124641490,	
}

while wait(2) do
	if game.ReplicatedStorage.NukeInProgress.Value==true then
		local badgeID = 2124678404  -- Change this to your badge ID
		ap = game.Players:GetChildren()
		for i = 1, #ap do
			b = game:GetService("BadgeService")
			b:AwardBadge(ap[i].userId,badgeID)
		end
	elseif game.Workspace:FindFirstChild("Map") then
		local MapName = game.Workspace.Map.MapName.Value
		if Badges[MapName] then
			for _, player in pairs(game.Players:GetPlayers()) do 
				game:GetService("BadgeService"):AwardBadge(player.userId, Badges[MapName])
			end
		end
	end
end
1 Like