while true do
local badgeId = 2124743111
for _, player in pairs(game.Players:GetPlayers()) do
game:GetService("BadgeService"):AwardBadge(player.userId, badgeId)
end
wait(3)
end
the badge keeps on being given out even when the script is deleted.
I clone the map from server storage, put it into workspace, after it is done, I delete the clone. (this is all serverside). This script is server sided
I own an elevator meme game, called The Meme Rv, and the problem with this is after map plays in a server that has a badge anyone else who joins that server and didnt see it, gets the badge.
I don’t see why you have to use the while true do loop if you just want to award the badge once when something happens. Deleting the script should’ve stopped it, the only reason I see it not stopping is if you deleted it locally, and moving it to ServerStorage should’ve stopped it as well, and once again the only reason I see why not is if you moved it locally. In this case it’s much more convenient to just remove the while loop.
I want the badge to be awarded to everyone who sees the map, and some people might join after the badge has been awarded, maps typically last 30-80 seconds. I clone the map from server storage, put it into workspace, after it is done, I delete the clone. (this is all serverside)
I’m not here to tell someone how they should be making their game, but why don’t you just award the badge at the end when the map leaves? Anyways, check if the scripts you used to delete/move the script are local, because if they are, then that is most likely what’s causing the problem here.
I already said, I clone the map from server storage, put it into workspace, after it is done, I delete the clone. (this is all serverside). Im not stupid enough to make my games main script local sided
Is the script that calls for Destroy() a local script? I think that will only destroy the script client side. You might have to fire a remote event with it to get it to destroy a server script.
as I said before in a previous comment. I clone the map from server storage, put it into workspace, after it is done, I delete the clone. (this is all serverside). Im not stupid enough to make my games main script local sided
It definitely does, destroying the script or the script’s parent stops the loop when I tested it. I have no idea why it doesn’t work for OP but it’s definitely not a Roblox problem.