I'm making a script where when you touch the brick, it will copy itself and put that copy somewhere else. When I do this I get the error "players is not a valid member of DataModel". What does this mean? Here's the script:
Brick = game.Workspace.Part
function OnTouched(Part)
if game.players:GetPlayerFromCharacter(script.Parent)then
clone(Brick, Vector3.new(-33, 6.59, -35))
end
end
script.Parent.Touched:connect(OnTouched)

4 comments
Thanks. I'm a bit new to scripting.
I have one more question. Why is it local and what does local mean?
local means it is only available in the specific scope. More Info: http://www.lua.org/pil/4.2.html
Local variables are also more efficient, so use them whenever you can.