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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 21 Oct 2011 08:15 PM |
| I _did_ change it to something else. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 21 Oct 2011 08:17 PM |
| "String" is not reserved, why not use that? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 21 Oct 2011 08:19 PM |
| I thought it was a hint... T__T |
|
|
| Report Abuse |
|
|
|
| 21 Oct 2011 08:20 PM |
| And NOW I notice the "GUI" in the title. Silly me. |
|
|
| Report Abuse |
|
|
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 |
|
|