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

Script should work, it keeps saying Oreintation is not a Valid member of Model?

Asked by 6 years ago
--@SilverBunny_Gd

local CityPath = workspace:WaitForChild("City")
local Data = CityPath:GetChildren()

local Pos = nil
local Model = "Model"

local Storage = workspace:WaitForChild("Storage")

local CityModel = Instance.new(Model,workspace)
CityModel.Name = "CityPath"

for Number,DataObject in pairs(Data) do
    if DataObject then
        DataObject:Clone().Parent = Storage
        for Number,DataObj in pairs(Storage:GetChildren()) do
            DataObj.Parent = CityModel
            for Number,DataObj in ipairs(CityModel:GetChildren()) do
                DataObj.Orientation = DataObj.Orientation + Vector3.new(100,0,0)
            end
        end
    end
end

function Organize()

end

2 answers

Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
6 years ago
Edited 6 years ago

It says that because orientation is actually no valid member of model. You would have to change the orientation of every single child of the model. Feel free to accept my answer if this helped you.

0
Yeah ^ hiimgoodpack 2009 — 6y
0
Yeah ^ hiimgoodpack 2009 — 6y
0
but i used getChildren SilverBunny_Gd -7 — 6y
0
GetChildren() SilverBunny_Gd -7 — 6y
0
You must have tried to set the orientation of a model somewhere in the script. Asceylos 562 — 6y
Ad
Log in to vote
-1
Answered by 6 years ago

But i Used GetChildren() read the code pls

0
Could be that one of the children in GetChildren() is a model. You did not use :IsA("BasePart". Thundermaker300 554 — 6y
0
Please do not post a new answer replying to a different answer. Thundermaker300 554 — 6y

Answer this question