I want the script to look into this folder, which is inside a model labeled with the variable “map”:

It would look into the folder and for every part named “FloatUpBeforeDrop”, it would tween the object to, of course, float up. It would also rotate the object a bit and make it look as if the object were being sucked from the ground into a black hole (but slowly). Then half a second later, it would do the same thing for objects named “FloatUpBeforeDrop2”. Then lastly, it would do the “FloatUpBeforeDrop3” and “FloatUpBeforeDrop4” separately because they are single objects. I looked at the code many times but don’t see anything wrong with it.
local FloatUpBeforeDropFunc = coroutine.wrap(function()
local FloatUpTweenInfo = TweenInfo.new(10, Enum.EasingStyle.Quart, Enum.EasingDirection.In)
for i, instance in pairs(map.FloatUpBeforeDropObjects:GetDescendants()) do
if instance.Name == "FloatUpBeforeDrop" then
TS:Create(instance, SpinUpTweenInfo, {CFrame = instance.CFrame * CFrame.new(0, 40, 0) * CFrame.Angles(math.rad(360), 0, math.rad(-60))}):Play()
end
end
wait(0.5)
for i, instance in pairs(map.FloatUpBeforeDropObjects:GetDescendants()) do
if instance.Name == "FloatUpBeforeDrop2" then
TS:Create(instance, SpinUpTweenInfo, {CFrame = instance.CFrame * CFrame.new(0, 40, 0) * CFrame.Angles(math.rad(360), math.rad(-20), math.rad(-60))}):Play()
end
end
wait(1.2)
local FUBD3 = map.FloatUpBeforeDropObjects.FloatUpBeforeDrop3
TS:Create(instance, SpinUpTweenInfo, {CFrame = instance.CFrame * CFrame.new(0, 40, 0) * CFrame.Angles(math.rad(360), math.rad(-20), math.rad(-60))}):Play()
wait(0.7)
local FUBD4 = map.FloatUpBeforeDropObjects.FloatUpBeforeDrop4
TS:Create(instance, SpinUpTweenInfo, {CFrame = instance.CFrame * CFrame.new(0, 40, 0) * CFrame.Angles(math.rad(360), 0, math.rad(60))}):Play()
end)
Here’s a video on what is happening (The box I’m standing on is the union I’m tweening)
How do I fix this?