local p
p = game.Players.PlayerAdded:Connect(function(player)
print(player.Name)
p:Disconnect()
end)
this is the only way I know how. but i’d like to know if there’s an easier way to do this especially if i need to add multiple events for like 30 things (just an example). maybe self:Disconnect()? would this work?
There’s something called clean up modules, they’re self explanatory, you add items or tasks to a table and you call up a clean up method (either destroys or diconnects the tasks)
@Wyzloc Calling Disconnect or having the event disconnect automatically after the first fire (using Once) are the only ways to disconnect an RBXScriptSignal
Yeah that was the only alternative I can come up with that doesn’t involve using other people’s work. I rly just want my code to be simple which is why I’m trying to figure out if there’s more ways to do this. I’ll keep researching regardless but if I can’t find anything I’ll just use arrays or that maid thing.