Answered by
CPF2 406
6 years ago
:Wait() yields until an event happens, so if you did something like
1 | local character = player.Character or player.CharacterAdded:Wait() |
It would set the character variable as the character of the player, or wait until the player's character finishes loading, then it would set the variable.
As for :Disconnect(), it disconnects a function you set to run when an event fires, ex.
1 | local part = Instance.new( 'Part' ) |
3 | local function onPartTouched(hit) |
7 | local connection = part.Touched:Connect(onPartTouched) |