I have a randomized ore spawning system, however, the issue is that the ores are spawning on their sides… I’ve tried turning the part responsible for the location of where the ores will spawn, but to no avail… Any help would be most appreciated! Below you’ll find the code that I’ve been having issues with, and pictures of how the ore is supposed to look like as well as the sideways positioning that the ores are currently at.
Serverscript snippet that deals with spawning the ores.
if Ore == "Rock" then
local rockClone = Ores[1]:Clone()
rockClone.Parent = FoundLocation
rockClone:PivotTo(FoundLocation.CFrame)
rockClone.Parent.Occupied.Value = true
elseif Ore == "IronOre" then
local ironClone = Ores[2]:Clone()
ironClone.Parent = FoundLocation
ironClone:PivotTo(FoundLocation.CFrame)
ironClone.Parent.Occupied.Value = true
elseif Ore == "GoldOre" then
local goldClone = Ores[3]
goldClone.Parent = FoundLocation
goldClone:PivotTo(FoundLocation.CFrame)
goldClone.Parent.Occupied.Value = true
elseif Ore == "AzureOre" then
local azureClone = Ores[4]:Clone()
azureClone.Parent = FoundLocation
azureClone:PivotTo(FoundLocation.CFrame)
azureClone.Parent.Occupied.Value = true
How it’s supposed to look
How it’s spawning as