Is there a function for this purpose?
Be aware that I am not a professional scripter.
It's simple, really.
You can use the CharacterAdded
function.
local function onCharacterAdded(character) print(character.Name .. " has spawned") --Insert own code end