Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Character is not valid of member player ?

Error: Character is not valid of member player

" In a LocalScript "

local player = game.Players.LocalPlayer

player.Character.Humanoid.Died:connect(function()
	print(player.Name.." died")
	wait(5)
	workspace.CurrentCamera.Blur.Enabled = true
	print("Load Blur")
end)

1 answer

✓ Accepted answer

This is most likely caused by the fact that you are not waiting for the character to load, because the player loads before the character does

Try this:

local player = game.Players.LocalPlayer
repeat wait() until player.Character

player.Character.Humanoid.Died:connect(function()
    print(player.Name.." died")
    wait(5)
    workspace.CurrentCamera.Blur.Enabled = true
    print("Load Blur")
end)

1 comment

0

or just player:WaitForChild("Character")

This discussion is preserved as it was. New answers, comments, and votes are closed.