Categories > Coding > Lua >

How do I detect when PlayerRemoving/PlayerAdded is connected?

Posts: 257

Threads: 112

Joined: Jun, 2018

Reputation: 5

Posted

Right now, I don't know if it's possible to disconnect these events so I need to find a way to find if they're connected.

So for example if this code was run:

game:GetService("Players").PlayerAdded:Connect(function(playerAdded)

     --Code here

end)

How would I be able to detect the event is connected?


Any information would be appreciated.

  • 0

Exploits I own: Synapse, Electron

Scripts I've made: Aimbot GUI, Draco Admin

Scripts I'm working on: More game ESPs

Hectique

Hectique

Posts: 1307

Threads: 186

Joined: Nov, 2019

Reputation: 14

Replied

Well, first of all I think you wrote the function wrong.

 

game.Players.PlayerAdded:Connect(function(player) -- Detects when a player is added, you can use "player" as a way to call a player.

        -- Code Here! And yes I decided to add "Syntax Highlighting"

end)

 

And, I am not so sure that this is actually possible. (I certainly have never tried this before).

  • 0

a former active and known member of the WRD community, but im kinda just a meme now

Posts: 257

Threads: 112

Joined: Jun, 2018

Reputation: 5

Replied

@OpenGamerTips

Thanks! The code you provided works (I've tested with an alt account).

  • 0

Exploits I own: Synapse, Electron

Scripts I've made: Aimbot GUI, Draco Admin

Scripts I'm working on: More game ESPs

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )