I'm doing this so that the player has to press a GUI button to be "unlocked" , but that's in a different script.
This script is in the Workspace, but it wont work for some reason in both Solo mode and multiplayer.
game.Players.PlayerAdded:connect(function(player) player:WaitForChild(player.Character) local torso = player.Character.Torso torso.Anchored = true end)
The player's character is not a child of the player, it is a property like any instance's parent. There is an event for that.
This script I wrote seems to work in solo.
function onCharLoaded(char) char.HumanoidRootPart.Anchored = true end function onPlayerAdded(player) player.CharacterAdded:connect(onCharLoaded) end game.Players.PlayerAdded:connect(onPlayerAdded)