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

Error cloning a model? " Position is not a valid member of model"

Asked by 4 years ago
Edited 4 years ago

When I am trying to clone a model using the script below it brings up an error saying "Position is not a valid member of model" pointing an arrow at line 4.

while true do
    local noob = game.ServerStorage.Noob:Clone()
    noob.Parent = game.Workspace
    noob.Position = Vector3.new(-121, 0.5, -34)
    wait(0.2)
end
0
read my answer :-) JasiuJasiuB 13 — 4y
0
A Model is a grouping of entities, a mere container. You need to reference a PrimaryPart (center piece) to shift the entire collection position. Ziffixture 6913 — 4y

1 answer

Log in to vote
3
Answered by
Leamir 3138 Moderation Voter Community Moderator
4 years ago

Hello, SyncSim!

You can use :MoveTo() to move a model to a certain position. Remember that your model needs to have a primary part for this to work

while true do 
    local noob = game.ServerStorage.Noob:Clone() 
    noob.Parent = game.Workspace 
    noob:MoveTo(Vector3.new(-121, 0.5, -34)) 
    wait(0.2) 
end
Ad

Answer this question