|
| 16 Sep 2014 06:59 PM |
This is not changing the text in the SurfaceGUI. I put where i think the problem is.
x = 1 wait(0.1) local s = game.Workspace.TARDIS.Variables.Status local d = game.Workspace.TARDIS.Variables.Dest local m = game.Workspace.TARDIS.Destinations:GetChildren() local dest = game.Workspace.TARDIS.Variables.Dest local override = game.Workspace.TARDIS.Variables.Override local shuffling = game.Workspace.TARDIS.Variables.Shuffling function onClicked() if override.Value == false and shuffling.Value == false then local m = game.Workspace.TARDIS.ConsoleRoom.Destinations:GetChildren() if x ~= #m and x ~= 0 then wait(0.1) x = x+1 dest.Value = x elseif x == #m then wait(0.1) x = 1 -- reset numbers dest.Value = x end if override.Value == false and shuffling.Value == false then local g = script.Parent.Parent.Parent.Parent.Parent.Destinations:GetChildren() for i = 1,#g do if g[i]:FindFirstChild("num").Value == d.Value then game.Workspace.LEVERDESTINATION.SurfaceGui.Frame.TextLabel.Text = g[i] ---*HERE* end end end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2014 07:00 PM |
This is all it prints.
19:59:49.646 - x = 1 wait(0.1) local s = game.Workspace.TARDIS.Variables.S:33: attempt to index global 'script' (a nil value)
Its red btw lel
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 16 Sep 2014 07:11 PM |
| are you running it in loadstring or something |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2014 07:17 PM |
Nope just all you see in a script getting values from strings (Idk if thats what you mean lel)
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 16 Sep 2014 07:27 PM |
| well generally console output looks nothing like that so i'm confused |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2014 07:30 PM |
What this does is gets values out of some strings and is suppose to put it into the SurfaceGUI text and frame but it ain't working as i said.. I don't understand what you don't understand :/
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 16 Sep 2014 07:37 PM |
output is generally like
time - error time - script name/location time - script line
your source code was literally pasted into the console, and it wasn't even the relevant lines, and that shouldn't happen afaik. |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 16 Sep 2014 07:37 PM |
| which is more evidence as to why it can't access "script," which would make sense if it's not being run from a script object. |
|
|
| Report Abuse |
|
|
Deplexity
|
  |
| Joined: 18 Nov 2011 |
| Total Posts: 1965 |
|
|
| 16 Sep 2014 07:47 PM |
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Thats the error. I don't see whats wrong with it, unless your running it from the in-studio command bar. |
|
|
| Report Abuse |
|
|
frommage
|
  |
| Joined: 22 Apr 2014 |
| Total Posts: 100 |
|
|
| 16 Sep 2014 08:23 PM |
"(onClicked)" isn't it (onClick) ? sorry im new :P |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2014 05:54 PM |
Still not working.
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 17 Sep 2014 05:58 PM |
| Could be (cheesecakeisnice). It just has to be the name of a function which will be called when that event fires. |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2014 06:01 PM |
I am a beginner can you send me a link to a wiki link to understand it or do it for me if your nice?
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2014 07:09 PM |
See this is what i hate about this forum people view but don't post. Even if you do not know whats wrong state a prediction.
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
frommage
|
  |
| Joined: 22 Apr 2014 |
| Total Posts: 100 |
|
| |
|
|
| 18 Sep 2014 05:13 PM |
Are you doing it? :/
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 05:16 PM |
| So totally a beginner, yet I've been scripting for about 6 months now and have no idea wtf this does. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 08:00 PM |
BUMP
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2014 07:11 PM |
BUMP[2]
Change is inevitable; progress is optional. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Sep 2014 08:15 AM |
x = 1 wait(0.1) local s = game.Workspace.TARDIS.Variables.Status local d = game.Workspace.TARDIS.Variables.Dest local m = game.Workspace.TARDIS.Destinations:GetChildren() local dest = game.Workspace.TARDIS.Variables.Dest local override = game.Workspace.TARDIS.Variables.Override local shuffling = game.Workspace.TARDIS.Variables.Shuffling function onClicked() while s do end if override.Value == false and shuffling.Value == false then local m = game.Workspace.TARDIS.ConsoleRoom.Destinations:ClearAllChildren() if x ~= #m and x ~= 0 then wait(0.1) x = x+1 dest.Value = x elseif x == #m then wait(0.1) x = 1 -- reset numbers dest.Value = x end
if override.Value == false and shuffling.Value == false then local g = script.Parent.Parent.Parent.Parent.Parent.Destinations:GetChildren() for i = 1,#g do if g[i]:FindFirstChild("num").Value == d.Value then game.Workspace.LEVERDESTINATION.SurfaceGui.Frame.TextLabel.Text = g[i] ---*HERE* end end end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
frommage
|
  |
| Joined: 22 Apr 2014 |
| Total Posts: 100 |
|
| |
|