generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GUI Appear Button

Previous Thread :: Next Thread 
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
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
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 06:01 PM
Bump

~Stars for a siggy~
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 06:04 PM
B2
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 06:07 PM
B3
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 06:11 PM
Nobody will help me?
B4
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 06:14 PM
Yolo + I really would like to know...
B5
Report Abuse
lethalgraal is not online. lethalgraal
Joined: 22 Sep 2014
Total Posts: 13
17 Feb 2015 07:45 PM
"Holder.Parent = Location.PlayerGUI"

It is PlayerGui, not PlayerGUI - it's case sensitive
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 07:55 PM
ah, thanks
Report Abuse
ChuckXZ is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image