so like if I go somethingHapped:connect(functionName()) how would i be able to disconnect that function?
✓ ANSWER ACCEPTED
Is it possible to dis-connect a function?
2 answers
✓ Accepted answer
If you store the connection (local connection = event:Connect(function)), you can call :Disconnect() on it (connection:Disconnect()).
It really depends which function. Here is an example of a function you could use Disconnect().
game.Players.PlayerAdded:Connect(function))
--code here
end)
game.Players.PlayerRemoved:Disconnect(function()
--code here
end)
If this helped please accept this answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.
