#funtion if character is added

1 messages · Page 1 of 1 (latest)

mellow zealot
#

hey I want like a function in a server script which like connects everytime a players character is added so when he joins and whenever he dies how would I do this...

pure cove
mellow zealot
#

CharacterAdded is not a valid member of Players "Players"

pure cove
mellow zealot
pure cove
#

wat

mellow zealot
#

wait

pure cove
#

what exactly are you trying to accomplish with it

mellow zealot
pure cove
#
game.Players.PlayerAdded:Connect(function(p)
    local function Stuff(character)
        -- do stuff
    end

    if p.Character then Stuff(p.Character) end
    p.CharacterAdded:Connect(Stuff)
end)
mellow zealot