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: Problem #1

Previous Thread :: Next Thread 
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:26 AM
Hello,

I'm making my game and I have a little Screengui that says

p.Name .. " Has connected" , it's small and white it will go away in 3 seconds.
But when 2 people join at the same time, it will mess up and get the 2 texts like it's 1 text, how can I fix this ?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
05 Jan 2015 07:29 AM
Depends how you're handling it, dude.
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:32 AM
This is my script, real simple;

game.Players.PlayerAdded:connect(function(p)
script.Parent.Text = p.Name .. " Has Connected!"
wait"3"
script.Parent.Text = " "
end)
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:39 AM
b1
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
05 Jan 2015 07:41 AM
script.Parent.Text = (script.Parent.Text == "" and p.Name.." has connected. " or script.Parent.Text..p.Name.." has connected.")


Idk I'm not really sure what you're expecting to happen here dude
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:43 AM
That it will change the text into

"Fatalizer Has Connected" as soon as I join the game, or somebody else depends on the name.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
05 Jan 2015 07:43 AM
"wait" takes a number, not a string.
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:44 AM
You can do both. You can use
wait()
wait""
wait''
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
05 Jan 2015 07:45 AM
That's only because you are implicitly converting it to a number. It still doesn't take a string.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
05 Jan 2015 07:46 AM
(I just assumed that Roblox typecasted it incase of people being bubs)
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:46 AM
Could be, bit it's kinda off-topic.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
05 Jan 2015 07:46 AM
lol
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:47 AM
It isn't such lol, though.
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 07:59 AM
b2

Could someone help ?
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 08:05 AM
b3
Report Abuse
theD1R3W0LF is not online. theD1R3W0LF
Joined: 19 Apr 2011
Total Posts: 3219
05 Jan 2015 08:09 AM
add a line before it changes to player .. "has connected" that changes the text to nothing ""

ps im on my phone
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 08:10 AM
I already did.
Report Abuse
theD1R3W0LF is not online. theD1R3W0LF
Joined: 19 Apr 2011
Total Posts: 3219
05 Jan 2015 08:16 AM
add an if statmeny to check if the text is already filled if so, make another textlabel 100 pixels above with player .. "has connected"
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 08:22 AM
That´s the problem, I can´t do things like that yet.
Report Abuse
theD1R3W0LF is not online. theD1R3W0LF
Joined: 19 Apr 2011
Total Posts: 3219
05 Jan 2015 08:24 AM
wat
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 08:27 AM
Check if it's already filled and else make a new text 100 pixels above.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
05 Jan 2015 08:31 AM
Put this in a script, the script inside of your ScreenGui and then your thing inside of the script

local o = script:GetChildren()[1]
game.Players.PlayerAdded:connect(function(p)
local n = o:Clone();
n.Parent = script.Parent;
n.Position = n.Position+UDim2.new(0,0,0,n.Size.Y.Offset*(#script.Parent:GetChildren() - 2))
n.Text = p.Name.." has connected."
wait(3)
n:Destroy()
end)
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
05 Jan 2015 08:32 AM
he wants a queue
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
05 Jan 2015 08:32 AM
or that
Report Abuse
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
05 Jan 2015 08:35 AM
So it would be;

->StarterGui
->Screengui
->TextLabel
--My script
--eLunate Solition

Correct ?
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