Codathryl
|
  |
| Joined: 12 Jan 2011 |
| Total Posts: 474 |
|
|
| 13 Sep 2016 05:15 PM |
local display = game.Workspace.Museum.StudioOne.Display[script.Parent.DisplayVal.Value]
Error: 17:53:22.615 - Display is not a valid member of Model
R$151 R$ - 1,883 RAP - Send trades |
|
|
| Report Abuse |
|
|
ManxFox
|
  |
| Joined: 12 Nov 2008 |
| Total Posts: 227 |
|
|
| 13 Sep 2016 05:16 PM |
where is the script located right now?
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2016 05:16 PM |
If this is executed right at the beginning of a script it could be that Display hasn't yet loaded.
Use :WaitForChild("Display") to yield the script until a child with that name is found in the current object. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 13 Sep 2016 05:17 PM |
local display = workspace.Museum.StudioOne.Display
print(display)
if that errors then display doesnt exist. Otherwise use waitforchild
|
|
|
| Report Abuse |
|
|
Codathryl
|
  |
| Joined: 12 Jan 2011 |
| Total Posts: 474 |
|
|
| 13 Sep 2016 06:06 PM |
@TimeTicks the thing is I want it to go to the next display if the current one is full.
R$126 R$ - 1,883 RAP - Send trades |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 13 Sep 2016 06:08 PM |
What do you mean by 'full' ?
|
|
|
| Report Abuse |
|
|
Codathryl
|
  |
| Joined: 12 Jan 2011 |
| Total Posts: 474 |
|
|
| 13 Sep 2016 06:13 PM |
By full I mean there is already a painting on display.
R$126 R$ - 1,883 RAP - Send trades |
|
|
| Report Abuse |
|
|
Codathryl
|
  |
| Joined: 12 Jan 2011 |
| Total Posts: 474 |
|
|
| 13 Sep 2016 06:14 PM |
I found out that using Display[script.Parent.DisplayVal.Value] doesnt equal Display#, it's just Display, and that [script.Parent.DisplayVal.Value] tries to find the part/model "1" in Display#. Any way I can fix this?
R$126 R$ - 1,883 RAP - Send trades |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 13 Sep 2016 06:16 PM |
the value will have to be the name of the model
so
Display['Some Name']
must be the same for
Display[StringValue.Value]
print(StringValue.Value) >> 'Some Name'
|
|
|
| Report Abuse |
|
|