This is the script i have, doesn’t seem to work fully, any ideas. (Ive been on this bug for like 3 days ) It supposed to make a minimap that will load structures when the player gets close. I didn’t want to use ro-render
I think the reason might be the stream.So you should code
Map objects.descendantsadded:connect(function(des)
if des:isa(“base part”) then
des:clone().parent = map
end
end)
I just found the model u used in the game.
for i, Object in pairs(MapObjects:GetChildren()) do
Object :Clone().Parent = MiniMap
end
I mean just use the first loop not the second one!
and also be sure to have the models inside the foldr named “Map Objects” since thats how it worked out for me
Edit: use Heartbeat since it runs at 30 fps and it wont be noticable on gameplay for better data usage game:GetService("RunService").Heartbeat
that wouldnt really work if des is a Model or meshpart or particle or highlight or selection boxes also the code is %90 fine
I just answered this in the topic you posted earlier.
for i, Object in pairs(MapObjects:GetChildren()) do
for a, Objects in pairs(Object:GetChildren()) do
Objects:Clone().Parent = Minimap
end
end
You shouldn’t do this. This is only going to get children of children under MapObjects
, and direct children are going to be missing. The documentation for Instance:Clone()
states:
Clone creates a copy of an instance and all of its descendants
So cloning children’s children is unnecessary.
wait isnt this just what I said? U need to just get the Children Under the MapObject(folder) not descendants