How do you anchor a gui? | Needing Help

Post closed, thanks.

I found out what it was a bit ago before everyone posted and after I posted. Thanks.

I’ve tried many things and I cannot just get it to anchor, in studio it looks anchored but when you get in game it’s not, and also I want it to stay at the top but it’s going below and some things don’t anchor.

Can anyone help me?

Alright, I see a bunch of things wrong/things that probably don’t exist here:

  1. You shouldn’t access StarterGui, instead use player:WaitForChild(“PlayerGui”)

  2. Guis don’t have a CFrame, and I’m pretty sure CFrame doesn’t have an Anchor function

  3. You can’t anchor the entire game like that, you’ll have to loop through every part in workspace to accomplish that.

  4. Players is always Players, you can’t set it to anything else (like AllGuisAnchor, which most likely doesn’t exist)

  5. Players service does not have an Anchored function

Anyways, if I understand you correctly, you might want to try turning on IgnoreGuiInset in your screen Gui

1 Like

wayyyyy too many coding sins spotted here.

  1. You CANNOT anchor a GUI.

  2. GUI’s dont have a CFrame, their position is defined using Udim2 or Udim.

  3. Access the Gui using PlayerGui, not Starter Gui

  4. You can only anchor 3D Meshes, parts and some other stuff

  5. Most of the syntax in your code is wrong, to Anchor something, you use whatever.Anchored = true

  6. You cannot anchor a player, if you want to make the player motionless, you set WalkSpeed and JumpPower to 0.

  7. You CANNOT anchor ‘game’ as game is a global variable and it does not have an anchored proprety

  8. printing Anchor will do nothing, because Anchor is a string in your print statement

  9. game.Player:Entered is no valid syntax, you use game.playerAdded.

  10. Make variables bruh

  11. game.Players = game.AllGuisAnchor, I dont know what you are doing with this

  12. Just turn on IgnoreGuiInset.

2 Likes

Yeah, I found that after I made this post.