I am Trying to parent a map to The Work space object but i keep getting This error when test it:
ServerScriptService.MainLoop:42: attempt to index field 'Parent' (a nil value)
MainLoop.lua :
local MapsFolder = ServerStorage:WaitForChild('Maps')
local AvailibleMaps = MapsFolder:GetChildren()
--------------------------------------------------Map Prossesing
local UsedMap = AvailibleMaps[math.random(1,#AvailibleMaps)]
local TemporaryMap = UsedMap:Clone()
TemporaryMap.Parent.Parent(workspace)
local SpawnPoints = TemporaryMap:FindFirstChild('SpawnPoints')
local AvailibleSpawnPoints = SpawnPoints:GetChildren()
-------------------------------------------------------
This Is Not The Whole Script But Just Everything I Think Is Relevant Ask In The Comments If You Have Any Questions

1 comment
Oh Sorry Fixed It by Changing The Parenting To TemporaryMap.Parent = workspace