#Somethimes plr.CharacterAdded doesnt detect

1 messages · Page 1 of 1 (latest)

candid basin
#

SO I have a spawnscript where it is basicly looking for a spawn before the character is loaded which means AutoLoadCharacter is false and the spawnscript is basicly ```lua
while nospawnFound do
looking for spawn
if spawn then
nospawnfound = false
plr:LoadCharacter
end
end

but sometimes the script that I have which is basicly 
```lua
  game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        print(char)
                do otherVeryImportantStuff
    end
  end

doesnt detect that my character is added as you see in the video whenever it fires the funtion than it prints the character so "Flipy_XYZ" and if not that nothing but someerrors
and also my character is loaded as you guys see

wanton rose
#

if player.Character then (insert function here) end

#

I always have sum like this

#

Then no matter how late the script runs it still works

candid basin
wanton rose
#

How so

#

If CharacterAdded doesn't work

#

then it must mean the character existed before it was listening

#

So they checking if player.character already exist would work

wanton rose
#

Something like this doesn't work

#

Bc the character would already exist before it started listening

candid basin
candid basin
wanton rose
#

I couldn't say

#

when I do something similar to the scripts u provided it works everytime

scarlet star
#

why not just do all this when the char dies / is removed

#

overall characteradded is a connection that requires way too many conditions to be met to fire

#

you can use characterappearanceloaded as an alternative

candid basin
#

but basicly yes

candid basin
# wanton rose I couldn't say

yea so I did it like this ```lua

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
Stuff(char,plr)
end)
if plr.Character then Stuff(plr.Character,plr) end
end)