Hello developers! I have ran into an issue that I can’t figure out. I used the MoveTo function to clone a model and move it to a requested position. Sometimes, the MoveTo function doesn’t go to the correct position. Is this a bug? Or may it be that I am doing something wrong? Thank you!
local orbs = script.Parent.Parent.orbs
local redorb = workspace.resources.landing
local greenorb = workspace.resources.jumping
local children = orbs:GetChildren()
local order = 1
for p = 1, #children do
for i = 1, #children do
if children[i].order.Value == order then
if children[i].Name == "R" then
wait(children[i].delay.Value)
local c1 = redorb:Clone()
c1.Parent = workspace
c1:MoveTo(children[i].Position)
c1.inner.Script.Disabled = false
c1.outter.Script.Disabled = false
end
if children[i].Name == "G" then
wait(children[i].delay.Value)
local c2 = greenorb:Clone()
c2.Parent = workspace
c2:MoveTo(children[i].Position)
c2.inner.Script.Disabled = false
c2.outter.Script.Disabled = false
end
order = order + 1
children[i].Transparency = 1
end
end
end
Video: https://drive.google.com/file/d/1OuFiMs0YfmgwydHNbHvqSf3NE19BSNze/view?usp=sharing