|
| 08 Mar 2016 03:56 PM |
Hello Peeps. I've made a small info gui with a few buttons that open a other frame.
I made this in my Scripting server. After all is done. I've tested it via Studio solo mode (it worked) Then i've tried via playing Online (Also worked).
Now i placed it to my other server. Tested it via Solo (Worked) Testing in Play (not working) it looks like the Button's dont react on the mouse click. But only in that place. Now a friend told me some stuff about Local? Uhu?
I use just Normal scripts. ive also tried LocalScript. Not working....
You can test it here: http://www.roblox.com/games/339515622/Ontwikkelings-Werkplaats
i hope there is someone who could help me or explain how the duck this pee happens.................................................................. Because it worked in the scripting creating place. (Just a normal place)
Help? |
|
|
| Report Abuse |
|
|
galio13
|
  |
| Joined: 20 Jul 2011 |
| Total Posts: 842 |
|
|
| 08 Mar 2016 04:16 PM |
| I'll take a look at it tomorrow, ir you can just post the script here. And you'll get an answer now, since I'm on my phone |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 04:30 PM |
Galio13 Oki xD. It are 3 scripts. but they look the same. Only the direction is different:
This is for "TextButton1"
local Button = script.Parent local Frame = script.Parent.Parent.Menu local Assets = script.Parent.Parent.Assets local Close = script.Parent.Parent.CloseButton local RestFrame = script.Parent.Parent.Menu.Menu2 local RestFrame2 = script.Parent.Parent.Menu.Credits local TextBoxMenu = script.Parent.Parent.Menu.TextBox
local SoundCustomEnable = true function onClick() --[[ -- Since this is a local sound, only the player will hear it, no one else. (unless you do a remote event but thats far advanced for a button script. --]] Assets.localSound:Play() if SoundCustomEnable == true then wait (0.23) -- The sound will play for 5 seconds until is stops, You can change this Assets.localSound:Stop() Assets.localSound.TimePosition = 0 end
if Frame.Visible == false then Frame.Visible = true Close.Visible = true Button.Text = "C" wait(0.05) Button.Text = "Cl" wait(0.05) Button.Text = "Clo" wait(0.05) Button.Text = "Clos" wait(0.05) Button.Text = "Close" wait(0.05) Close.Text = "Click Me To Close All :)" elseif Frame.Visible == true then Frame.Visible = false Close.Visible = true Button.Text = "I" wait(0.05) Button.Text = "In" wait(0.05) Button.Text = "Inf" wait(0.05) Button.Text = "Info" wait(0.05) Button.Text = "Infor" wait(0.05) Button.Text = "Inform" wait(0.05) Button.Text = "Informa" wait(0.05) Button.Text = "Informat" wait(0.05) Button.Text = "Informati" wait(0.05) Button.Text = "Informatio" wait(0.05) Button.Text = "Information" wait(0.05) RestFrame.Visible = false RestFrame2.Visible = false TextBoxMenu.Text = "Welcome! Inside Here, You Can Find Any Information About The Efteling" end end
Button.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 04:57 PM |
I noticed how repetitive parts of your script are, so I'm going to help you out with a simple function (I'll look at your issue after I send this message):
function textTick (object,text,timeInterval) for i=1,#text do object.Text = text:sub(1.i) wait(timeInterval) end end
for example, textTick(Button,"Close",.05) should do what your script is doing with the close script, and it is reusable.
|
|
|
| Report Abuse |
|
|
os_time
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2247 |
|
|
| 08 Mar 2016 05:13 PM |
Uh that's wrong too
function textTick(object, text, timeInterval) for i = 1, string.len(text), 1 do object.Text = text:sub(1, i) wait(timeInterval) end end
http://www.roblox.com/mne-item?id=374063815 http://www.roblox.com/yee-item?id=376895439 #code ARCUS |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:14 PM |
Hey seanbenish this is very helpfull, Ill type here as how i thinks it should be:
local Button = script.Parent
function textTick (Button,Close,0.5) for i=1,#text do object.Text = text:sub(1.i) wait(timeInterval) end end
Button.MouseButton1Click:connect(onClick)
Is this the right way as how i do this?
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:16 PM |
os_time.
So it should be this?:
local Button = script.Parent
function textTick(Button, Close, 0,5) for i = 1, string.len(text), 1 do object.Text = text:sub(1, i) wait(timeInterval) end end
Button.MouseButton1Click:connect(onClick)
Is this one right? |
|
|
| Report Abuse |
|
|
os_time
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2247 |
|
|
| 08 Mar 2016 05:18 PM |
The function he gave is suppose to reduce things like this Button.Text = "C" wait(0.05) Button.Text = "Cl" wait(0.05) Button.Text = "Clo" wait(0.05) Button.Text = "Clos" wait(0.05) Button.Text = "Close" wait(0.05) To textTick(Button, "Close", 0.05)
http://www.roblox.com/mne-item?id=374063815 http://www.roblox.com/yee-item?id=376895439 #code ARCUS |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:21 PM |
@os_time
For strings, string.len() and # return the same thing. But that's okay, I understand your concern. :)
|
|
|
| Report Abuse |
|
|
os_time
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2247 |
|
|
| 08 Mar 2016 05:22 PM |
"(1.i)" but ok
http://www.roblox.com/mne-item?id=374063815 http://www.roblox.com/yee-item?id=376895439 #code ARCUS |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:24 PM |
guys /\
i did this
function textTick(Button, "Close", 0.05) for i = 1, string.len(text), 1 do object.Text = text:sub(1, i) wait(timeInterval) end end
and at "Close" it marks it with the red line underneath it (Forgot name) |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:34 PM |
@EftelingProductions{
Could you elaborate on what your mean by "red line underneath it" please? }
@os.time{
Could you elaborate on how #"(o.i)" differs in output from string.len("(o.i)")? I am curious due to this not being the case for default lua. (Studio won't load right now :/)
}
|
|
|
| Report Abuse |
|
|
os_time
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2247 |
|
|
| 08 Mar 2016 05:37 PM |
I just switched it because it had more color for me lol What I meant was that this line would error object.Text = text:sub(1.i)
http://www.roblox.com/mne-item?id=374063815 http://www.roblox.com/yee-item?id=376895439 #code ARCUS |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:40 PM |
@os_time { Oh, thank you! I didn't see that there; my bad :P }
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2016 05:42 PM |
seanbinish.
Roblox does call it a "Error Line"
Take a script and just typ "lol" but then forget 1 " and youll see a line under it. |
|
|
| Report Abuse |
|
|