Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Torso Gui

How would I put a Gui in the torso of every character in the game?

2 answers

✓ Accepted answer

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

1 comment

0

Thank You

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.