yeah that is a memory leak, you’re not cleaning up the connection and there is no way to access it so it just sits in memory and uses useless space, on top of that, it will be reconnected every time you call the function, so more events will pop up and sit there.
to fix this, keep a reference to the event to clean it up later:
local myeventref = nil
local function name()
if myeventref then myeventref:Disconnect() myeventref = nil end--reset the variable to clean up the connection
myeventref = RS.Increase.OnServerEvent:Connect(function()--connect and assign.
print ("hello");
end)
end
something like that, if you need multiple use an array, but whatever you do, make sure the connection is cleaned up.