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

Why does it say that 'model is not a valid member of workspace'?

-------------------------------------< variables >---------------------------------------
local model = workspace.Model
local dummies = model:GetChildren("Dummy")
local humsInGame = {}
-------------------------------------< code >--------------------------------------------
script.Parent.Touched:Connect(function(hit)
	game.Players.PlayerAdded:Conect(function(pl)
		local char = pl.Character
		if char then
			print("found")
		end
	end)
end)

this script is parented to a part that is parented to a tool in the starter pack (the part is called Handle btw) why does it say'

20:09:44.823 - Model is not a valid member of Workspace

4 comments

0

Well is there an instance named "Model" in the workspace?

0

also there is a typo in "game.Players.PlayerAdded:Conect(function(pl)"

0

yeah there is

0

yeah there is

1 answer

✓ Accepted answer

You tried to set the variable model to an instance named Model in the workspace. It seems like that instance doesn't exist. Make sure there is an instance named Model in the workspace and it should work. If there is multiple of them make sure it is named differently.

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