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 » Scripting Helpers
Home Search
 

Re: GUI Question

Previous Thread :: Next Thread 
AdvancedWeapons is not online. AdvancedWeapons
Joined: 11 May 2014
Total Posts: 201
02 Jul 2014 11:01 PM
What if a player entered the server, and I wanted it to say (Example) Welcome AdvancedWeapons! Would I put "Welcome(insertplayernamehere!" For the script?
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
02 Jul 2014 11:05 PM
...

game.Players.PlayerAdded:connect(function(p)
repeat wait() until p and p.PlayerGui
local sg = Instance.new("ScreenGui", p.PlayerGui)
local tl = Instance.new("TextLabel", sg)
tl.BackgroundTransparency = 1
tl.Text = "Welcome "..p.Name.."!"
wait(4)
for i = 1,10 do
tl.TextTransparency = tl.TextTransparency +.1
wait(.1)
end
end)
Report Abuse
AdvancedWeapons is not online. AdvancedWeapons
Joined: 11 May 2014
Total Posts: 201
03 Jul 2014 03:27 AM
How would I out that script into a GUI? (I'm a noob, I know nothing about scripting, sorry.)
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
03 Jul 2014 10:50 PM
Well that script would make a textlabel on the players screen saying 'Welcome PLRNAME!' when they join, you would just have to change the position, since that script would make it in the top left.
Report Abuse
AdvancedWeapons is not online. AdvancedWeapons
Joined: 11 May 2014
Total Posts: 201
05 Jul 2014 04:21 PM
Ok so I put those lines into a script, then do I put it into Workspace, StartGUI, or ScreenGUI>Frame>Script or ScreenGUI- Script and Frame?
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
05 Jul 2014 06:21 PM
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p and p.PlayerGui
local sg = Instance.new("ScreenGui", p.PlayerGui)
local tl = Instance.new("TextLabel", sg)
tl.BackgroundTransparency = 1
tl.Position = UDiM2.new(0.45,0,0.45,0)
tl.FontSize = Enum.FontSize.Size48
tl.Text = "Welcome "..p.Name.."!"
wait(4)
for i = 1,10 do
tl.TextTransparency = tl.TextTransparency +.1
wait(.1)
end
sg:Destroy()
end)

That script in the workspace would fire every time someone joins, and make a TextLabel on their screen in the center saying 'Welcome PLRNAME!', then would wait 4, slowly go transparent, then destroy itself.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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