0

# Why does this script not find the player in workspace?

game.Players.PlayerAdded:Connect(function(player)
wait(2)
game.Workspace:FindFirstChild(player.Name):Destroy()

end)


Alright, This should always work, It sees when a player joins, then takes one of the values under the player, The name and finds it in the workspace. The model always has the same name as the player. Yet it gives me the error "Attempt to index a nil value". even though it says "player" is the new child of game.Players. What is happening? Is it a new Roblox update?

0
game.Players.PlayerAdded:Connect(function(player)