Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is not a valid member of model?

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)

1 comment

0

Try using game.Lighting.Cards:WaitForChild('Card1') --Stuff

1 answer

✓ Accepted answer

You probably want to do:

local card1 = game.Lighting.Cards.Card1
card1.Parent = game.Workspace.JobTray.Jobs
card1.Anchored = false

1 comment

0

That worked. Thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.