|
| 17 Feb 2015 05:58 PM |
Where did I go wrong? It's inside of a part. ====================================================================== local Button = script.Parent -- Our part
function onTouch(Brick) -- Start the function to pass us the triggering object as Brick local Player = Brick.Parent:findFirstChild("Humanoid") -- Search for a Humanoid if (Player~=nil)then -- Verify that the Humanoid in Player Exists local Holder = Instance.new("ScreenGui") -- Create a new ScreenGui to hold our GUI local Label = Instance.new("TextLabel") -- Create a new GUI Label to be in our Holder local Location = game:GetService('Players'):GetPlayerFromCharacter(Player.Parent) -- Find Player folder for our Player Holder.Parent = Location.PlayerGUI -- Insert the Holder into the PlayerGUI Label.Parent = Holder -- Insert our Label into the Holder Label.Text = "Hello" .. Player.Parent.Name -- Set the text of our Label and include the Player's name Label.Position = UDim2.new(0,100,0,100) -- Position the Label Label.Size = UDim2.new(0,100,0,100) -- Position the Label Label.Font = "ArialBold" -- Change the font of the Label Label.FontSize = "Size14" -- Change the font size of the Label end end
Button.Touched:connect(onTouch) -- Connect a Touched event on the Part to our function ============================================================================
~Stars for a siggy~ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 17 Feb 2015 06:14 PM |
Yolo + I really would like to know... B5 |
|
|
| Report Abuse |
|
|
|
| 17 Feb 2015 07:45 PM |
"Holder.Parent = Location.PlayerGUI"
It is PlayerGui, not PlayerGUI - it's case sensitive |
|
|
| Report Abuse |
|
|
| |
|
ChuckXZ
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 2996 |
|
|
| 17 Feb 2015 08:01 PM |
add these lines of code:
local plr = game.Players:FindFirstChild(Brick.Parent.Name) Holder.Parent = plr.PlayerGui
add those under the new holder instance
+1 Post. |
|
|
| Report Abuse |
|
|