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 » Scripters
Home Search
 

Re: What is going on here, why doesn't it work?

Previous Thread :: Next Thread 
Codathryl is not online. 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 is not online. ManxFox
Joined: 12 Nov 2008
Total Posts: 227
13 Sep 2016 05:16 PM
where is the script located right now?


Report Abuse
FloweryMonkeyboy5 is not online. FloweryMonkeyboy5
Joined: 19 Sep 2012
Total Posts: 528
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 is not online. 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 is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
13 Sep 2016 06:08 PM
What do you mean by 'full' ?


Report Abuse
Codathryl is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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