New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Is using a loop to wait for a character better than using characteradded?

Asked by 3 months ago
Edited 3 months ago

Is using a loop such as

local Character ; while not Player.Character or not Player.Character.Parent do wait() end ; Character = Player.Character ;

better than using a characteradded event?

0
CharacterAdded simply passes a Character argument. Waiting for the Character to spawn in is literally the same thing as CharacterAdded because the loop stops at the same time that CharacterAdded would fire. BashCaster 2370 — 3mo
0
I know it is the same thing, but I was told that the code above is safter than the event. Thesquid13 301 — 3mo
0
A repeat loop is the most common option to wait until the character exists. BashCaster 2370 — 3mo

Answer this question