How do I put player's character in Lighitng?

Hello! I wanted to put player’s character in Lighting through script when they join game, wrote pretty simple code, but it gave me error. This is what I wrote:

game.Players.PlayerAdded:Connect(function(plr)
	plr.Character.Parent = game:GetService("Lighting")
end)

I still can’t understand what is wrong and also couldn’t find anything about it. How do I fix it?

1 Like

Maybe wait until the character joins? I can’t really find a reason why you need to place them in Lighting though

player.CharacterAdded:Connect(function(char)
1 Like

i need to put it there, cuz its a game which shouldnt have player’s character, also it helped, thank you so much

In this case btw you can just click on Players in the workspace and there is a property under it named something like “CharacterAutoLoads” which I used to stop the player from respawning, but if you do use it you need to load their character with :LoadCharacter()

1 Like