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
 

Script is not a valid member of Part???

Previous Thread :: Next Thread 
StratosphericMaster is not online. StratosphericMaster
Joined: 26 Oct 2013
Total Posts: 130
25 Jan 2015 05:01 PM
local caveenter = game.Workspace.CaveEnter

local thescript = script.Parent.Parent.Script

script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
wait(1)
torch = game.Lighting["Torch"]:clone()
torch.Parent = player.Backpack
caveenter.Part1.CanCollide = false
caveenter.Part2.CanCollide = false
caveenter.Part3.CanCollide = false
thescript.Parent = caveenter.Part1
end
end)

Throws error "Script is not a valid member of Part"

Ummmm... What part???
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
25 Jan 2015 05:07 PM
Check the line please, it will remove your confusion.

Apparently script.Parent.Parent is a Part.
Report Abuse
locococo3616 is not online. locococo3616
Joined: 01 Sep 2010
Total Posts: 30
25 Jan 2015 05:20 PM
When you type local thescript = script.Parent.Parent.Script and you get an error it means:

1. script.Parent.Parent is a part

2. script.Parent.Parent.Script does not exist. It could be because you named it wrong or you made a typo somewhere
Report Abuse
StratosphericMaster is not online. StratosphericMaster
Joined: 26 Oct 2013
Total Posts: 130
25 Jan 2015 05:23 PM
Well script.Parent.Parent is ServerStorage, so...
Report Abuse
StratosphericMaster is not online. StratosphericMaster
Joined: 26 Oct 2013
Total Posts: 130
25 Jan 2015 05:59 PM
Bump!
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Jan 2015 06:21 PM
Why do you need to bump the thread when the answer was just given?
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Jan 2015 06:24 PM
why should it matter if it is in serverstorage. the directory never leaves the brick itself then even if you placed it in workspace the script would fault there.

local thescript = script.Parent.Parent.Script < This doesn't exist

do you mean

local thescript = script.Parent.Parent.script

the brick is local script.Parent.Parent

and it is saying

Script isnt a valid child of script.Parent.Parent Look in the brick, is there something named "Script" exactly?

?

Remember, scripting is case sensitive.
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