GetChildren() problem

Heyyyy! I’m having a problem with my script, here’s the output.
Workspace.location.part.Script:9: attempt to index number with ‘Position’

local part = game.ReplicatedStorage.[script.Parent.Name]
local pos = script.Parent.Model:GetChildren()

local num = math.random(1,3)

local clone = part:Clone()
clone.Parent =
clone.Position = pos..num.Position
1 Like

GetChildren returns a table, doing t…x won’t work.

Do this instead:
clone.Position = pos[num].Position

1 Like

The problem is fixed! Tysm!!!

1 Like