Basically, I have a script and a BodyGyro in a part. The part is not anchored or cancollide, but it has a BodyPosition object to hold it in place. What I want to do is have the part always face the player (I'm going to make it a local part so each player sees it face them, but that's later). However, whenever I run the script in solo, it does not make the object face the player, but throws no errors. Why is this?
game.Players.PlayerAdded:connect(function(plr)
while plr do
wait()
player = game.Players:GetPlayerFromCharacter(plr)
if player then
script.Parent.BodyGyro.cframe = CFrame.new(player.HumanoidRootPart.Position)
end
end
end)
Thank you for any feedback, advice, or changes you have.

2 comments
No I want to access the actual player. Still, after fixing it and getting rid of that line, it didn't work.
After testing the original script with print commands, it finds plr but never reaches player. It can't find the player from the character.