Error with a script

Issue: Player.Character.Parent is workspace reguardless of script change

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		print(char)
		print(char.Parent)
		char.Parent = workspace:WaitForChild("Players")
		print(char.Parent)
		print(char)
	end)
end)
  19:36:50.676  Workspace.movePart.Script:80: attempt to index nil with 'WaitForChild'  -  Server - Script:80
  19:36:50.679  Stack Begin  -  Studio
  19:36:50.679  Script 'Workspace.movePart.Script', Line 80  -  Studio - Script:80
  19:36:50.679  Stack End  -  Studio
  19:36:50.696  NubblyFry  -  Server - Script:3
  19:36:50.705  nil  -  Server - Script:4
  19:36:50.754  Players  -  Server - Script:6
  19:36:50.761  NubblyFry  -  Server - Script:7
2 Likes

I think you just need

game.Players:GetPlayers()

because that doesnt really make sense due to it not knowing what “Players” is

What doesn’t make sence about it?

There is a property called Archieveble. If you want to clone/re-parent a player’s character, you might need to first check it that property is true.

2 Likes

game.Players:GetPlayers() is a table and shows the amount of players in game anyway, bit confused :face_with_spiral_eyes:

Would this make it so that the Player’s Character.Parent is changed to the folder?

Wait for the character appearance to load then change the parent.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAppearanceLoaded:Connect(function()
		player.Character.Parent = workspace.Players
	end)
end)
2 Likes

Roblox no cap sucks, changed the game to R6 and this worked :skull:

I’ve been having a lot of issue’s regarding the players character in my games that I made that were set to R15, I was gonna change it to R6 anyway, but it’s annoying that I can’t test much with R15 in my game anymore.

Maybe sucks is really brash, but it’s pretty frustrating.