Map not cloning into workspace properly

I recently was working on cloning the map to workspace from replicated storage using :Clone()
It seems to work fine with other 2 maps but this one map doesn’t look good…

Full map

FullMap

What loads in

out of 10 times I have tested, full map cloned only once.
every time some parts will be missing and some will clone (Like some part which cloned this time may or may not clone next time.).

The whole map is in a model and I used :Clone() to clone whole model.

Any help would be grateful :slight_smile:

1 Like

Are you sure you are Cloning the Map and not the Detail?

1 Like

Can you send your code?

1 Like

Ya like what I did is
Model:Clone().Parent = game.Workspace

1 Like

Ya sure, just give me a min while I open the studio

1 Like

What is this “Model”, are you using pairs, ipairs? or just a regular Path CLone?

1 Like

Also may be a bit late to respond because im making a map for my game.

1 Like

ill share the script and a ss of explorer once I open the Studio… check it…

1 Like

@DasKairo and @JustAGameDeveloper1
This is the part of script that will destroy previous map and clone the new one

if Run then
		Step = 6
		Time = 0
		re:FireAllClients(Step, Time, Mode, Map)
		for i, v in pairs(game.Workspace.Map:GetChildren()) do
			v:Destroy()
		end
		for i, v in pairs(game.Players:GetPlayers()) do
			v.Character.HumanoidRootPart.Position = Vector3.new(0, 10, 0)
		end
		wait(0.5)
		Map:Clone().Parent = game.Workspace.Map
	end



The issue is with Fantasy Kingdom
and in the script, Map refers to the map which won the vote…

1 Like

The script works fine with other two maps but not with this one

Parts in this map anchored? anchoredanchoredanchoredanchored

1 Like

Yea they are anchored

1 Like
  • If you clone the descendants of the map & then place that entire table of parts into the workspace does it still bug out like this?

  • When the map doesn’t load properly, is the map in replicated storage loaded correctly if you drag it out into workspace?

1 Like

actually, it loading completely in server but not in clint side… and unfortunately all the players are getting same unloaded map

What about if you do for i,v in pairs(Map:GetDescendants()) do local Clone = v:Clone() Clone.Parent = game.Workspace.Map

2 Likes

Would not suggest cloning as a bulk model. This isn’t pratical for network loads.

Instead, iterate through the elements of your model and clone them individually.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.