How doi anchor a player's Head From a local script from PlayerGui
Simple enough. You would simply just create a LocalScript and put this script inside a gui, or just in the game.StarterGui instance as is.
The Code With Helpful Notes
1 | local player = game.Players.LocalPlayer --Getting our player |
2 | repeat wait() until player.Character --Making sure our character has fully loaded |
3 | local char = player.Character --After it's loaded it will set this variable |
4 | local head = char:WaitForChild( 'Head' ) --Getting the head from our character |
5 |
6 | head.Anchored = true --Making the characters head, anchored. |
Hope this helped! If this answered your question please accept my answer!
1 | local L_ 1 _ = game.Players.LocalPlayer --Getting our player |
2 | repeat |
3 | wait() |
4 | until L_ 1 _.Character --Making sure our character has fully loaded |
5 | local L_ 2 _ = L_ 1 _.Character --After it's loaded it will set this variable |
6 | local L_ 3 _ = L_ 2 _:WaitForChild( 'Head' ) --Getting the head from our character |
7 |
8 | L_ 3 _.Anchored = true |