Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is not a valid member of model?

Asked by 8 years ago

So I'm making a script and in the outbox it says

116:24:35.412 - Card1 is not a valid member of Model
216:24:35.412 - Script 'Workspace.Screening.Jobs.Job4.Script', Line 2
316:24:35.412 - Stack End

Although here is a picture of the lighting before the script is ran

Picture: http://prntscr.com/bod81x

And here is the script

1script.Parent.ClickDetector.MouseClick:connect(function()
2    game.Lighting.Cards.Card1 = game.Workspace.JobTray.Jobs
3    game.Workspace.JobTray.Jobs.Card1.Anchored = false
4end)
0
Try using game.Lighting.Cards:WaitForChild('Card1') --Stuff BinaryResolved 215 — 8y

1 answer

Log in to vote
0
Answered by
einsteinK 145
8 years ago

You probably want to do:

1local card1 = game.Lighting.Cards.Card1
2card1.Parent = game.Workspace.JobTray.Jobs
3card1.Anchored = false
0
That worked. Thanks. thebootsie123 160 — 8y
Ad

Answer this question