I am building a game, with ores. Now I want the ores to be cloned, but they don’t show in Explorer and the map. Can anybody help?
Heres the cloning part:
while wait(5) do
local y = GetRarities(ore)
print(ore)
if ore == “IronOre” then
cloneIron = IronOre:Clone()
cloneIron.Parent = game.Workspace
local randomX = math.random(-27.625, 143.125)
local randomZ = math.random(55.125, 224.875)
cloneIron.Invis.Anchored = false
cloneIron.Parto.Anchored = false
cloneIron.Partp.Anchored = false
cloneIron.Partq.Anchored = false
cloneIron.Partr.Anchored = false
local neededPos = Vector3.new(randomX,-17.971,randomZ)
cloneIron:MoveTo(neededPos)
else
print(“Dang, you are sure lucky!”)
end
end
What print statements are you getting in the output?
This isnt going to stop your ore from cloning but will help you down the road: Rather than set many parts to unanchor, you should have all the ore parts unanchored already and weld constraint them to your main ore part that is anchored… this will also be your Primary Part which the MoveTo function uses… then you just unanchor that one primary part when you want it to fall.
Lastly you define variable y in the beginning and then never reference it again… how are you calling on this ore to clone it?