|
| 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 |
|
|
|
| 25 Jan 2015 05:07 PM |
Check the line please, it will remove your confusion.
Apparently script.Parent.Parent is a Part. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 25 Jan 2015 05:23 PM |
| Well script.Parent.Parent is ServerStorage, so... |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jan 2015 06:21 PM |
| Why do you need to bump the thread when the answer was just given? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|