Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 5 months ago
Edited 5 months 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 7 — 5mo
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 5732 — 5mo

1 answer

Log in to vote
3
Answered by
Leamir 2963 Moderation Voter Community Moderator
5 months 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