I’m using a rudimentary script to make a heart shape via coordinates in a table. The heart shape forms using a repeat until loop. The problem is that 6 of the ‘parts’ of the heart stop at the 6th coordinate instead of travelling to the 7th and final coordinate.
for i, v in pairs(postab) do
if not debounce then
debounce = true
table.insert(tabtab, 7, v)
local newHP = HeartPart:Clone()
newHP.Parent = Frame.newHP
newHP.Position = UDim2.new(tabtab[1][1][1], tabtab[1][1][2], tabtab[1][2][1], tabtab[1][2][2])
newHP.Visible = true
for _, pos in pairs(tabtab) do
print("Postab".." "..i, "and tabtab".." ".._)
if pos == "Finished" then
table.remove(tabtab, 7)
Next = 0
debounce = false
else
local tabpos = UDim2.new(pos[1][1], pos[1][2], pos[2][1], pos[2][2])
local xdiff = tabpos.X.Scale - newHP.Position.X.Scale
local ydiff = tabpos.Y.Scale - newHP.Position.Y.Scale
local xchange = xdiff/5
local ychange = ydiff/5
if newHP.Position ~= tabpos then
repeat
wait(.01)
--print(newHP.Position, "This has been made via number".._)
newHP.Position = UDim2.new(newHP.Position.X.Scale + xchange, newHP.Position.X.Offset, newHP.Position.Y.Scale + ychange, newHP.Position.Y.Offset )
local xdiffnew = tabpos.X.Scale - newHP.Position.X.Scale
local ydiffnew = tabpos.Y.Scale - newHP.Position.Y.Scale
until xdiffnew <= 0.0001 and ydiffnew <= 0.0001
end
end
end
end
end