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: need help with a GUI

Previous Thread :: Next Thread 
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 07:53 PM
i have this script (Made by Babyzander44)

while true do
local string = "Hello, Welcome to my Game Currently Version 1.2.5 Enjoy your stay ~Dragon829"
for i = 1, #string do
script.Parent.Text = string:sub(1, i)
wait(.33)
end
wait(30)
end


but how do i make it scroll from right to left instead of adding word by word?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:03 PM
First of all, don't make a variable "string".

while wait(30) do
local String = "Hello, Welcome to my Game Currently Version 1.2.5 Enjoy your stay ~Dragon829"
for i = 1, #String do
script.Parent.Text = string.rep(" ", #String-i)..String:sub(1, i)
wait(.33)
end
end
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 08:08 PM
@King

1.) There's no problem with setting "string" as a variable,
local string = "yes"

print(string)

Doesn't mean it's the best idea, but there's no problem with it.

2.) Don't add "while wait(30) do", it makes it wait 30 seconds before it even starts before it does it. Do while true do wait(30), it doesn't wait in the beginning.

3.) I tested your script, it doesn't work either. I also have no idea why you added "string.rep(arg1, arg2)"
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 08:10 PM
kk now how do i make it remove as soon as all letters are shown? or make it move From Right ALL the way to the left out of screen
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 08:11 PM
his script works but

while wait(30) do
local String = "Hello, Welcome to my Game Currently Version 1.2.5 Enjoy your stay ~Dragon829"
for i = 1, #String do
script.Parent.Text = string.rep(" ", #String-i)..String:sub(1, i)
wait(.33)
end
end

script.Parent.Text = string.rep(" ", #String-i)..String:sub(1, i)
should be
script.Parent.Text = String.rep(" ", #String-i)..String:sub(1, i)
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:11 PM
There is a problem with it if you don't want the userdata with all the string functions getting overwritten.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:12 PM
No, it should not be String.rep, it should be string.rep. That's the main reason I changed it to String instead of keeping it as string.
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 08:12 PM
@Dragon

My idea is inefficient, but you could set it so the text is there, and use tweenposition.

http://wiki.roblox.com/index.php/TweenPosition_%28Method%29
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
21 Oct 2011 08:13 PM
That would require intermediate scripting ability, which I assume you don't have.

local p = "Hello, Welcome to my Game Currently Version 1.2.5 Enjoy your stay ~Dragon829"

function scroll()
local portions = {}
for i=1,p:len()*2 do
if i <= p:len() then
script.Parent.Text = p:sub(1,i)
script.Parent.TextXAlignment = "Left"
else
script.Parent.Text = p:sub(i-p:len(),p:len())
script.Parent.TextXAlignment = "Right"
end
wait(0.04)
end
end

while wait() do
scroll()
end
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 08:14 PM
@King

Just noticed why you changed it.

Why not just change the variable to something else then?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:15 PM
I _did_ change it to something else.
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 08:16 PM
@King

I know, what didn't you see of "__Just noticed why you changed it.__"

Was saying why didn't you just change the variable of String = "blah" to something like text = "blah"
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:17 PM
"String" is not reserved, why not use that?
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 08:19 PM
Arceus it works but their is 1 Problem, when the Letters hit the middle it skips over to the Other side how to fix this?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:19 PM
I thought it was a hint... T__T
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Oct 2011 08:20 PM
And NOW I notice the "GUI" in the title. Silly me.
Report Abuse
hillow25 is not online. hillow25
Joined: 20 Jan 2009
Total Posts: 125
21 Oct 2011 09:19 PM
JUST noticed xD



local bob = (:/)-/--<
If bob ~= nil then
CREATEHATRZ
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