How would I put a Gui in the torso of every character in the game?
For future reference, this is not a good question. You can put a GUI Object into the Torso of every character easily by simply parenting it, but it won't display anywhere.
What I assume you mean to ask is, "How do I make a GUI appear on the front of the torso of every player in the game?"
In which case my answer is this:
local gui = Instance.new("SurfaceGui") gui.Name = "TorsoGui" gui.CanvasSize = Vector2.new(500, 500) Instance.new("Frame", gui).Size = UDim2.new(1,0,1,0) for _, v in ipairs(Game.Players:GetPlayers()) do local torso = v.Character:FindFirstChild("Torso") local lgui = gui:Clone() lgui.Parent = v lgui.Adornee = torso end
Should work, Inserts the GUI into the child when a child is added to the Players.
game.Players.ChildAdded:connect(function(child) if child:FindFirstChild("Character") then c = GUILOCATIOn c:Clone.Parent = child.Character.Torso end end)
Locked by JesseSong
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?