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: Player Entered Gui

Previous Thread :: Next Thread 
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
12 Aug 2011 04:22 PM
Only part of it works. It creates the gui, but the gui isn't in the right position and it doesn't go away. No output, but when I do Tools>Test>Start Server and Tools>Test>Start Player,
when I go to the server screen, the GUI's Absolute Position just keeps going up really fast. Help!


game.Players.PlayerAdded:connect(function(newplayer)
gui = Instance.new("ScreenGui")
gui.Parent = game.StarterGui

text = Instance.new("TextLabel")
text.Text = newplayer.Name.." Has Joined The Game!"
text.Size = UDim2.new(0.200000003, 0, 0.200000003, 0)
text.Position = UDim2.new(-.3, 0, 0.699999988, 0)
text.BorderColor3 = Color3.new(163, 162, 165)
text.Parent = gui

image = Instance.new("ImageLabel")
image.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..newplayer.Name
image.Size = UDim2.new(0.100000001, 0 , 0.200000107, 0)
image.Position = UDim2.new(-.1, 0, 0.699999988, 0)
image.BorderColor3 = Color3.new(163, 162, 165)
image.Parent = gui

repeat
text.Position = text.Position + UDim2.new(.5,0,0,0)
image.Position = image.Position + UDim2.new(.5,0,0,0)
wait(.1)
until image.Position == UDim2.new(.2, 0, 0.699999988, 0) and text.Position == UDim2.new(0, 0, 0.699999988, 0)
wait(2)
repeat
text.Position = text.Position - UDim.new(.5,0,0,0)
image.Position = image.Position - UDim2.new(.5,0,0,0)
wait(.1)
until text.Position == UDim2.new(-.3, 0, 0.699999988, 0) and image.Position == UDim2.new(-.1, 0, 0.699999988, 0)
gui:Remove()

end)

Report Abuse
lukenuke75 is not online. lukenuke75
Joined: 26 Jul 2008
Total Posts: 423
12 Aug 2011 04:27 PM
That's your problem, don't use absolute. Use Relative(Offset). That way everyone's screen size will see it/It is easier to use.
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
12 Aug 2011 04:29 PM
That's what I am doing isn't it?. I mean when I click the "ScreenGui" is says "AbsolutePosition" and that keep going up. The offset is the first number in each pair right?

Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
12 Aug 2011 04:36 PM
i always use Scale and not offset (the first one in each bracket) :o
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
12 Aug 2011 04:37 PM
Wait,wait,wait. I am using the ones with X's.
(x,0,x,0)

Thats the one that changes the gui based on the person's computer screen right?
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
12 Aug 2011 04:49 PM
as long as what luke says is wrong then yes :)
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
12 Aug 2011 05:09 PM
Ya, so then what is wrong with the script?
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
12 Aug 2011 06:45 PM
Bump
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