Help with my flower

Thank you all for your help and support it works perfectly now!
Oh and don’t feel bad if you insulted me i can handle it and i got my answer.

Okay so the problem i have is that the coinpart doesn’t tween in when i request the tween. I did some prints to check but i only got out of that that it does saves the tween however it does now play. I’d like some help on this because i don’t see a mistake in my code. Also my appologies for the long code i undestand if you don’t want to look at it.

Okay so i red in the comments that my code is a complete mess and offending stuff of all sorts so i want to specify that it goes wrong with CoinPart1 which is used in the ErrorTween.

Yes i’m a beginner.
Yes i know my code is long and messy.
No this is not a joke.

local TweenService = game:GetService('TweenService')

local Info1 = TweenInfo.new(

2,

Enum.EasingStyle.Linear,

Enum.EasingDirection.In,

0,

false,

0

)

local Info2 = TweenInfo.new(

4,

Enum.EasingStyle.Linear,

Enum.EasingDirection.In,

0,

false,

0

)

local TweenGoal1 = {Transparency = 0}

local TweenGoal2 = {Transparency = 1}

local TweenGoal3 = {Color = Color3.fromRGB(161, 196, 140)}

local TweenGoal4 = {Color = Color3.fromRGB(31, 128, 29)}

local TweenGoal5 = {Color = Color3.fromRGB(255, 176, 0)}

local TweenGoal6 = {Color = Color3.fromRGB(231, 231, 236)}

local Tween1 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant1, Info1, TweenGoal1)

local Tween2 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant2, Info1, TweenGoal1)

local Tween3 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant3, Info1, TweenGoal1)

local Tween4 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant4, Info1, TweenGoal1)

local Tween5 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant5, Info1, TweenGoal1)

local Tween6 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant6, Info1, TweenGoal1)

local Tween7 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant7, Info1, TweenGoal1)

local Tween8 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant8, Info1, TweenGoal1)

local Tween9 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant9, Info1, TweenGoal1)

local Tween10 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant10, Info1, TweenGoal1)

local Tween11 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant11, Info1, TweenGoal1)

local Tween12 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant12, Info1, TweenGoal1)

local Tween13 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant13, Info1, TweenGoal1)

local Tween131 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant1, Info2, TweenGoal2)

local Tween132 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant2, Info2, TweenGoal2)

local Tween133 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant3, Info2, TweenGoal2)

local Tween134 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant4, Info2, TweenGoal2)

local Tween135 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant5, Info2, TweenGoal2)

local Tween136 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant6, Info2, TweenGoal2)

local Tween137 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant7, Info2, TweenGoal2)

local Tween138 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant8, Info2, TweenGoal2)

local Tween139 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant9, Info2, TweenGoal2)

local Tween140 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant10, Info2, TweenGoal2)

local Tween141 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant11, Info2, TweenGoal2)

local Tween142 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant12, Info2, TweenGoal2)

local Tween143 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant13, Info2, TweenGoal2)

local Tween14 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant1, Info2, TweenGoal4)

local Tween15 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant2, Info2, TweenGoal4)

local Tween16 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant3, Info2, TweenGoal4)

local Tween17 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant4, Info2, TweenGoal4)

local Tween18 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant5, Info2, TweenGoal4)

local Tween19 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant6, Info2, TweenGoal4)

local Tween20 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant7, Info2, TweenGoal4)

local Tween21 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant8, Info2, TweenGoal4)

local Tween22 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant9, Info2, TweenGoal4)

local Tween23 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant10, Info2, TweenGoal4)

local Tween24 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant11, Info2, TweenGoal4)

local Tween25 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant12, Info2, TweenGoal4)

local Tween26 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.Plant13, Info2, TweenGoal4)

local Tween27 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower1, Info1, TweenGoal1)

local Tween28 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower2, Info1, TweenGoal1)

local Tween144 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower1, Info2, TweenGoal2)

local Tween145 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower2, Info2, TweenGoal2)

local Tween29 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower1, Info2, TweenGoal5)

local Tween30 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.YellowFlower2, Info2, TweenGoal5)

local Tween31 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower1, Info1, TweenGoal1)

local Tween32 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower2, Info1, TweenGoal1)

local Tween33 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower3, Info1, TweenGoal1)

local Tween34 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower4, Info1, TweenGoal1)

local Tween35 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower5, Info1, TweenGoal1)

local Tween36 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower6, Info1, TweenGoal1)

local Tween37 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower7, Info1, TweenGoal1)

local Tween38 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower8, Info1, TweenGoal1)

local Tween39 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower9, Info1, TweenGoal1)

local Tween40 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower10, Info1, TweenGoal1)

local Tween41 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower11, Info1, TweenGoal1)

local Tween42 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower12, Info1, TweenGoal1)

local Tween43 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower13, Info1, TweenGoal1)

local Tween44 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower14, Info1, TweenGoal1)

local Tween45 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower15, Info1, TweenGoal1)

local Tween46 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower16, Info1, TweenGoal1)

local Tween47 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower17, Info1, TweenGoal1)

local Tween48 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower18, Info1, TweenGoal1)

local Tween49 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower19, Info1, TweenGoal1)

local Tween50 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower20, Info1, TweenGoal1)

local Tween51 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower21, Info1, TweenGoal1)

local Tween52 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower22, Info1, TweenGoal1)

local Tween53 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower23, Info1, TweenGoal1)

local Tween54 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower24, Info1, TweenGoal1)

local Tween55 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower25, Info1, TweenGoal1)

local Tween56 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower26, Info1, TweenGoal1)

local Tween57 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower27, Info1, TweenGoal1)

local Tween58 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower28, Info1, TweenGoal1)

local Tween146 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower1, Info2, TweenGoal2)

local Tween147 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower2, Info2, TweenGoal2)

local Tween148 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower3, Info2, TweenGoal2)

local Tween149 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower4, Info2, TweenGoal2)

local Tween150 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower5, Info2, TweenGoal2)

local Tween151 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower6, Info2, TweenGoal2)

local Tween152 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower7, Info2, TweenGoal2)

local Tween153 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower8, Info2, TweenGoal2)

local Tween154 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower9, Info2, TweenGoal2)

local Tween155 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower10, Info2, TweenGoal2)

local Tween156 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower11, Info2, TweenGoal2)

local Tween157 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower12, Info2, TweenGoal2)

local Tween158 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower13, Info2, TweenGoal2)

local Tween159 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower14, Info2, TweenGoal2)

local Tween160 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower15, Info2, TweenGoal2)

local Tween161 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower16, Info2, TweenGoal2)

local Tween162 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower17, Info2, TweenGoal2)

local Tween163 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower18, Info2, TweenGoal2)

local Tween164 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower19, Info2, TweenGoal2)

local Tween165 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower20, Info2, TweenGoal2)

local Tween166 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower21, Info2, TweenGoal2)

local Tween167 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower22, Info2, TweenGoal2)

local Tween168 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower23, Info2, TweenGoal2)

local Tween169 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower24, Info2, TweenGoal2)

local Tween170 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower25, Info2, TweenGoal2)

local Tween171 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower26, Info2, TweenGoal2)

local Tween172 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower27, Info2, TweenGoal2)

local Tween173 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower28, Info2, TweenGoal2)

local Tween59 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower1, Info2, TweenGoal6)

local Tween60 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower2, Info2, TweenGoal6)

local Tween61 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower3, Info2, TweenGoal6)

local Tween62 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower4, Info2, TweenGoal6)

local Tween63 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower5, Info2, TweenGoal6)

local Tween64 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower6, Info2, TweenGoal6)

local Tween65 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower7, Info2, TweenGoal6)

local Tween66 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower8, Info2, TweenGoal6)

local Tween67 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower9, Info2, TweenGoal6)

local Tween68 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower10, Info2, TweenGoal6)

local Tween69 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower11, Info2, TweenGoal6)

local Tween70 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower12, Info2, TweenGoal6)

local Tween71 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower13, Info2, TweenGoal6)

local Tween72 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower14, Info2, TweenGoal6)

local Tween73 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower15, Info2, TweenGoal6)

local Tween74 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower16, Info2, TweenGoal6)

local Tween75 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower17, Info2, TweenGoal6)

local Tween76 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower18, Info2, TweenGoal6)

local Tween77 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower19, Info2, TweenGoal6)

local Tween78 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower20, Info2, TweenGoal6)

local Tween79 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower21, Info2, TweenGoal6)

local Tween80 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower22, Info2, TweenGoal6)

local Tween81 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower23, Info2, TweenGoal6)

local Tween82 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower24, Info2, TweenGoal6)

local Tween83 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower25, Info2, TweenGoal6)

local Tween84 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower26, Info2, TweenGoal6)

local Tween85 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower27, Info2, TweenGoal6)

local Tween86 = TweenService:Create(script.Parent.Parent.Parent.WhiteFlower.WhiteFlower28, Info2, TweenGoal6)

local ErrorTween = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart1, Info1, TweenGoal1) print('It saved the ErrorTween thing.')

local Tween88 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart2, Info1, TweenGoal1)

local Tween89 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart3, Info1, TweenGoal1)

local Tween90 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart4, Info1, TweenGoal1)

local Tween91 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart5, Info1, TweenGoal1)

local Tween92 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart6, Info1, TweenGoal1)

local Tween93 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart7, Info1, TweenGoal1)

local Tween94 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart8, Info1, TweenGoal1)

local Tween95 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart9, Info1, TweenGoal1)

local Tween96 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart10, Info1, TweenGoal1)

local Tween97 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart11, Info1, TweenGoal1)

local Tween98 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart12, Info1, TweenGoal1)

local Tween99 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart13, Info1, TweenGoal1)

local Tween100 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart14, Info1, TweenGoal1)

local Tween101 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart15, Info1, TweenGoal1)

local Tween102 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart16, Info1, TweenGoal1)

local Tween103 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart17, Info1, TweenGoal1)

local Tween104 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart18, Info1, TweenGoal1)

local Tween105 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart19, Info1, TweenGoal1)

local Tween106 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart20, Info1, TweenGoal1)

local Tween107 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart21, Info1, TweenGoal1)

local Tween108 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart22, Info1, TweenGoal1)

local Tween109 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart1, Info1, TweenGoal2)

local Tween110 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart2, Info1, TweenGoal2)

local Tween111 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart3, Info1, TweenGoal2)

local Tween112 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart4, Info1, TweenGoal2)

local Tween113 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart5, Info1, TweenGoal2)

local Tween114 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart6, Info1, TweenGoal2)

local Tween115 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart7, Info1, TweenGoal2)

local Tween116 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart8, Info1, TweenGoal2)

local Tween117 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart9, Info1, TweenGoal2)

local Tween118 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart10, Info1, TweenGoal2)

local Tween119 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart11, Info1, TweenGoal2)

local Tween120 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart12, Info1, TweenGoal2)

local Tween121 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart13, Info1, TweenGoal2)

local Tween122 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart14, Info1, TweenGoal2)

local Tween123 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart15, Info1, TweenGoal2)

local Tween124 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart16, Info1, TweenGoal2)

local Tween125 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart17, Info1, TweenGoal2)

local Tween126 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart18, Info1, TweenGoal2)

local Tween127 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart19, Info1, TweenGoal2)

local Tween128 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart20, Info1, TweenGoal2)

local Tween129 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart21, Info1, TweenGoal2)

local Tween130 = TweenService:Create(script.Parent.Parent.Parent.Coin.CoinPart22, Info1, TweenGoal2)

script.Parent.ClickDetector.MouseClick:Connect(function(player)

if player.leaderstats.Gold.Value >= script.Parent.Parent.Parent.Cost.Value then

player.leaderstats.Gold.Value = player.leaderstats.Gold.Value - script.Parent.Parent.Parent.Cost.Value

end

script.Parent.ClickDetector.MaxActivationDistance = 0

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.ClickDetector.MaxActivationDistance = 0

Tween1:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant1.CanCollide = true

wait(2)

Tween2:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant2.CanCollide = true

Tween14:Play()

wait(2)

Tween3:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant3.CanCollide = true

Tween15:Play()

wait(2)

Tween4:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant4.CanCollide = true

Tween16:Play()

wait(2)

Tween5:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant5.CanCollide = true

Tween17:Play()

wait(2)

Tween6:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant6.CanCollide = true

Tween18:Play()

wait(2)

Tween7:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant7.CanCollide = true

Tween19:Play()

wait(2)

Tween8:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant8.CanCollide = true

Tween20:Play()

wait(2)

Tween9:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant9.CanCollide = true

Tween21:Play()

wait(2)

Tween10:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant10.CanCollide = true

Tween22:Play()

wait(2)

Tween11:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant11.CanCollide = true

Tween23:Play()

wait(2)

Tween12:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant12.CanCollide = true

Tween24:Play()

wait(2)

Tween13:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant13.CanCollide = true

Tween25:Play()

wait(2)

Tween26:Play()

wait(2)

Tween27:Play()

script.Parent.Parent.Parent.WhiteFlower.YellowFlower1.CanCollide = true

wait(2)

Tween29:Play()

wait(2)

Tween31:Play()

Tween32:Play()

Tween33:Play()

Tween34:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower1.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower2.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower3.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower4.CanCollide = true

wait(2)

Tween35:Play()

Tween36:Play()

Tween37:Play()

Tween38:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower5.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower6.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower7.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower8.CanCollide = true

Tween59:Play()

Tween60:Play()

Tween61:Play()

Tween62:Play()

wait(2)

Tween39:Play()

Tween40:Play()

Tween41:Play()

Tween42:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower9.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower10.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower11.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower12.CanCollide = true

Tween63:Play()

Tween64:Play()

Tween65:Play()

Tween66:Play()

wait(2)

Tween43:Play()

Tween44:Play()

Tween45:Play()

Tween46:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower13.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower14.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower15.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower16.CanCollide = true

Tween67:Play()

Tween68:Play()

Tween69:Play()

Tween70:Play()

wait(2)

Tween47:Play()

Tween48:Play()

Tween49:Play()

Tween50:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower17.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower18.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower19.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower20.CanCollide = true

Tween71:Play()

Tween72:Play()

Tween73:Play()

Tween74:Play()

wait(2)

Tween51:Play()

Tween52:Play()

Tween53:Play()

Tween54:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower21.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower22.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower23.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower24.CanCollide = true

Tween75:Play()

Tween76:Play()

Tween77:Play()

Tween78:Play()

wait(2)

Tween55:Play()

Tween56:Play()

Tween57:Play()

Tween58:Play()

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower25.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower26.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower27.CanCollide = true

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower28.CanCollide = true

Tween79:Play()

Tween80:Play()

Tween81:Play()

Tween82:Play()

wait(2)

Tween83:Play()

Tween84:Play()

Tween85:Play()

Tween86:Play()

Tween28:Play()

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.CanCollide = true

wait(2)

Tween30:Play()

script.Parent.ClickDetector.MaxActivationDistance = 32

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.ClickDetector.MaxActivationDistance = 32

end)

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.ClickDetector.MouseClick:Connect(function(player)

player.leaderstats.Gold.Value = player.leaderstats.Gold.Value + script.Parent.Parent.Parent.Yield.Value

script.Parent.ClickDetector.MaxActivationDistance = 0

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.ClickDetector.MaxActivationDistance = 0

Tween131:Play()

Tween132:Play()

Tween133:Play()

Tween134:Play()

Tween135:Play()

Tween136:Play()

Tween137:Play()

Tween138:Play()

Tween139:Play()

Tween140:Play()

Tween141:Play()

Tween142:Play()

Tween143:Play()

Tween144:Play()

Tween145:Play()

Tween146:Play()

Tween147:Play()

Tween148:Play()

Tween149:Play()

Tween150:Play()

Tween151:Play()

Tween152:Play()

Tween153:Play()

Tween154:Play()

Tween155:Play()

Tween156:Play()

Tween157:Play()

Tween158:Play()

Tween159:Play()

Tween160:Play()

Tween161:Play()

Tween162:Play()

Tween163:Play()

Tween164:Play()

Tween165:Play()

Tween166:Play()

Tween167:Play()

Tween168:Play()

Tween169:Play()

Tween170:Play()

Tween171:Play()

Tween172:Play()

Tween173:Play()

script.Parent.Parent.Parent.WhiteFlower.Plant1.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant2.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant3.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant4.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant5.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant6.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant7.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant8.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant9.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant10.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant11.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant12.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.Plant13.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.YellowFlower1.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower1.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower2.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower3.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower4.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower5.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower6.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower7.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower8.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower9.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower10.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower11.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower12.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower13.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower14.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower15.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower16.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower17.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower18.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower19.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower20.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower21.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower22.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower23.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower24.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower25.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower26.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower27.CanCollide = false

script.Parent.Parent.Parent.WhiteFlower.WhiteFlower28.CanCollide = false

wait(4)

ErrorTween:Play() print('It should do the tween now.')

Tween88:Play()

Tween89:Play()

Tween90:Play()

Tween91:Play()

Tween92:Play()

Tween93:Play()

Tween94:Play()

Tween95:Play()

Tween96:Play()

Tween97:Play()

Tween98:Play()

Tween99:Play()

Tween100:Play()

Tween101:Play()

Tween102:Play()

Tween103:Play()

Tween104:Play()

Tween105:Play()

Tween106:Play()

Tween107:Play()

Tween108:Play()

Tween109:Play()

script.Parent.Parent.Parent.Coin.CoinPart1.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart2.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart3.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart4.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart5.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart6.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart7.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart8.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart9.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart10.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart11.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart12.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart13.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart14.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart15.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart16.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart17.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart18.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart19.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart20.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart21.CanCollide = true

script.Parent.Parent.Parent.Coin.CoinPart22.CanCollide = true

wait(4)

Tween110:Play()

Tween111:Play()

Tween112:Play()

Tween113:Play()

Tween114:Play()

Tween115:Play()

Tween116:Play()

Tween117:Play()

Tween118:Play()

Tween119:Play()

Tween120:Play()

Tween121:Play()

Tween122:Play()

Tween123:Play()

Tween124:Play()

Tween125:Play()

Tween126:Play()

Tween127:Play()

Tween128:Play()

Tween129:Play()

Tween130:Play()

script.Parent.Parent.Parent.Coin.CoinPart1.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart2.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart3.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart4.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart5.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart6.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart7.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart8.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart9.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart10.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart11.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart12.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart13.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart14.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart15.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart16.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart17.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart18.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart19.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart20.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart21.CanCollide = false

script.Parent.Parent.Parent.Coin.CoinPart22.CanCollide = false

script.Parent.ClickDetector.MaxActivationDistance = 32

script.Parent.Parent.Parent.WhiteFlower.YellowFlower2.ClickDetector.MaxActivationDistance = 32

end)
272 Likes

Your code is very unclean, use for loops to better organize it. If you’re a beginner, I’d recommend starting with something simpler. It’s good that you’re trying something new. You could watch a few YouTube tutorials on tweening, and see if they’re anyhow useful?

You have over a hundred tweens. This isn’t required most of the time, I would recommend thinking this over.

EDIT

EDIT: I’m very sorry if my reply offended anyone. It wasn’t my intention to mock or disrespect anyone, and I apologize that I made it sound like that. I know that learning something new is very difficult. I was there once. I couldn’t wrap my head around loops and tweens. I don’t think this is completely useless - it’s a good thing you’re starting out and trying something you’ve never done before. Being you, I would review some of the more beginner-friendly stuff. Even if you did already, it never hurts to refresh your knowledge a bit.

I know of some worthy tutorials that helped me. The DevHub and YouTube are both useful sources. And if you still have problems understanding, don’t hesitate to ask again. There will be a few jerks out there who won’t help you. But if you believe in yourself, trust me, you can do it.

Roblox TweenService Tutorial - How To Tween Parts In Your Game - Part Tweening - YouTube
This one helped me understand the basics

Advanced Roblox Scripting Tutorial #10 - TweenService / Tween (Beginner to Pro 2019) - YouTube
This one helped me as well, especially getting “the hang” of it

Tween | Roblox Creator Documentation
This one helped me when scripting when I didn’t have time to watch an entire video. Includes code snippets, descriptions, and everything you need to know before you start tweening

EasingStyle | Roblox Creator Documentation
Also useful if you want to add a bit of style to your tweens and make them more interesting

41 Likes

I’m sorry, could you please give a clearer explanation?

Also, you should use functions/loops to make your code shorter. Maybe start with something simpler?

Edit: Why do you even need like, more than a 100 tweens? Most of them look the same? (Nevermind, it’s for different parts. Still highly inefficient.

7 Likes

thats a lot of lines for a flower

66 Likes

I have never seen a code which has 130 tweens…

30 Likes

I can’t help that much but what you could do is create a folder for the coins in the workspace and do the following stuff

local tweenService = game:GetService("TweenService")

local function tween(coin)
    -- just create your coin tween here with TweenInfo.new()
end

for i, coin in pairs(game.Workspace.CoinsFolder:GetChildren()) do
    tween(coin)

    i.CanCollide = -- Depends on you making it true or false
end

sorry i can’t help that much with your script it’s HUGE MESS

4 Likes

Really something I gotta say How are there so many lines of codes?!image

8 Likes

You can never handle such a big script which is just 1 big copy-paste of one another

3 Likes

The way he wrote the code made myself cry and also UwU what’s this?

An mess, seriously no offense but we suggest to learn for loops it’s much efficient. :smiley:

17 Likes

Over 100 tweens for a flower?!?!?! DEAR GOD…

But seriously though, clean up the code, add some loops and this will be better. There is no way that a simple flower animation should take more than 8 lines. This is 1000+ lines. :eyes:

But seriously, we can’t fix code this messy.

11 Likes

Even I have a habit of wanting to help others with any code they have but dear god this will be chaos to help out with.

Are you a new scripter? If so, you really should learn more about scripting before doing a big thing such as this

You don’t have variables so you’re repeating yourself so much which is going to cause a huge headache later on,

So much repetition, please use loops, they’ll reduce the length of your script by so much, and why do you have 173 or more tweens for a single flower? Just put it in a loop and play the tween instead of creating all of them in variables and waiting for their use

A lot needs to be improved before we can actually properly help you

11 Likes

Sorry fam, can’t read anything you copy and pasted there.

6 Likes

Clean up your code please. Use a lookup table for the different color tweens and a for loop for those different flowers and parts. Try learning about methods like :GetChildren() so you can loop through those parts instead of creating a tween for each one manually, same thing with the coin parts you turn CanCollide off for.

5 Likes

The 2 most important items for the script you made is :GetChildren() and for loops. They can make your script from 1000+ lines to like 30 or 20 lines instead.

Edit: Sorry for replying to the wrong person

4 Likes

Here is an example of what you could do for those tweens

local Model = script.Parent.Parent.Parent

for _, plant in next, Model.WhiteFlower:GetChildren() do
     local Tween = TweenService:Create(plant, Info1, TweenGoal1)
     Tween:Play()
     wait(2)
end
4 Likes

Very simple. What you also could do is create a local function(). Even better.

3 Likes

HAHAHAHAHHAHAHAH

@Stanny_2003 please clean your code
with

"```"
code
"```" 
3 Likes

The Developer Forum isn’t a place to be toxic to others. We just tell developers what is better and inspire them to do stuff better.

Edit: Just forget about that.

14 Likes

Woo i cant even see it please format it

4 Likes

It’s taking me 7+ seconds to just scroll down the script.

3 Likes