I can't change the player's CFrame when they're anchored

This worked fine when I tried it, are you sure the primaryPart is the current characters PrimaryPart? Are there any outputs?

would be a better practice for moving the player like @hannes213 said instead of moving the PrimaryPart.