Hello, Im trying to make a GUI for every player a Frame will get cloned and a text label in that frame will be the player's name.. Ive been trying to do this on my own without any luck.
Any thoughts?
Hello, Im trying to make a GUI for every player a Frame will get cloned and a text label in that frame will be the player's name.. Ive been trying to do this on my own without any luck.
Any thoughts?
Put a Local Script inside of StarterPlayerScripts, inside of it put the GUI you designed, write the following code
local Gui = script:WaitForChild("Gui")
local GuiFrame = Gui:FindFirstChild("GuiFrame")
local GuiLabel = GuiFrame:FindFirstChild("GuiLabel")
local Player = game:GetService("Players").LocalPlayer
GuiLabel.Text = Player.Name
Gui:Clone().Parent = Player:WaitForChild("PlayerGui")
script:Destroy()
explain the script.
First you're gathering the shortcuts to the Gui structure as a descendant of the Script. Changing the TextLabel using the indexed information to set the String to your username as the LocalScript is based under your Client, so there's no trouble getting that information. Cloning it to their GuiFolder so they can see the Gui, and destroying the Script afterward, leaving no trace?
Not excatly what I was looking for. I was wanting it to clone on only one person's GUI so it is kind of like a playerlist. But I think I can work with this.
The question was a bit hard to understand, I don't exactly understand it still, could you at least press answered though? every little bit helps right?
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Next time add your own code