i made a layered system where it positions models above eachother like a tower.
The Issue i currently have is its not positioning it correctly and it spawns under the model but with a gap.
i tried making new models for now to see is that was the problem but it wasn’t, and i also tried recoding the CF Part to this
local Cf = CFrame.new(orientation.X, orientation.Y * / 2, orientation.Z)
Here is some code i came up with but it dosn’t work in the studio im currently in. but in other studios it works fine.
Its Suppose to position the models Upwards.
Here is what happens:
local levels = 3
local Oy = CFrame.Angles(0, math.rad(90), 0)
for i = 1 , levels do
self.Counter += 1
-- Make the Models Here
local SpawnDropper = Tycoons[self.Tycoon.Name].DisplayLevel:Clone()
local orientation, size = SpawnDropper:GetBoundingBox()
local Cf = CFrame.new(orientation.X, size.Y * i / 2, orientation.Z)
local Gap = 4
local SizeZ = SpawnDropper.Alignment.Size.Z/2
if self.Counter == 1 then
SpawnDropper:PivotTo(CFrame.new(orientation.X, orientation.Y, orientation.Z) * Oy)
--// 928.48, 179.41, 2026.486 Start Position
else
SpawnDropper:PivotTo(Cf * Oy)
end
SpawnDropper.Parent = self.Tycoon.Inner.DropperDisplays
self.SpawnDropperTable[i] = SpawnDropper
-- Make The SpawnParts Here
local Position = 0
for j = i * 10 - 9, i * 10 do
task.wait(.1)
Position +=1
self.LoadedLevels[self.Owner.UserId][j] = Instance.new('Part')
local Part = self.LoadedLevels[self.Owner.UserId][j]
Part.Anchored = true
Part.Transparency = 1
Part.Position = SpawnDropper.Alignment.Position + Vector3.new(((Gap + SizeZ) - ((Position) * Gap) - AddZ ),1, 0)
Part.Size = Vector3.new(1.4, 1, 1.4)
Part:SetAttribute("Occupied", false)
Part.Parent = SpawnDropper.DropperPositions
Part.Name = `SpecialName_{j}` -- Option 1 Set Name
Part:SetAttribute('Level',j) -- Option 2 Check Attribute
--print(self.LoadedLevels[self.Owner.UserId][j]) -- Option 3 Get This Table At its Index
end
end