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 7 years ago

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

16:24:35.412 - Card1 is not a valid member of Model
16:24:35.412 - Script 'Workspace.Screening.Jobs.Job4.Script', Line 2
16: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

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

1 answer

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

You probably want to do:

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

Answer this question