So basically, I am making a round-based game, and I want a cutscene to play for the players who are ready to join the round before the round begins. Problem is, for that I need to use (or atleast I think so) "for i,v in pairs(game.Players:GetPlayers()) do", which clones the script as many times as how many players are in the server, thus resulting of sometimes playing the cutscene multiple times. Here's the code:
for i,v in pairs(game.Players:GetPlayers()) do
if v.Backpack.Ready.Value then
local cutscene = workspace.Map.CutsceneScript:Clone()
cutscene.Parent = v.Backpack
cutscene.Disabled = false
end
end
How do I make the script clone only 1 time?

4 comments
debounce
could you please try to write a more understandable response? thanks
I would have the script destroy itself when it is done running. If that is not the issue, I think the issue would be that the for loop is running inside of an event that fires too often.
the problem is, the script is cloned multiple times, so it will play itself anyway because theres multiple ones