Help with my flower

please clean your code
with

"```"
code
"```" 
2 Likes

“As a joke these comments LOL”

2 Likes
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)
7 Likes

ok what
the devforum is struggling to handle this one post please clean up your code a little bit

5 Likes

On a more serious note, try using animations instead. Not tweens.

4 Likes

Ayo there is no way this is your actual code… This really makes me want to cry so bad. I’m sorry but this is just an atrocity of a code, Say less my guy…

– have a for loop that iterates through instead.
– Clean up your code and I suggest using better scripting practices like WaitForChild() instead of a long line of .Parent’s
– Cause your using a large amount of tween’s, over time memory can be used to store these Tween Base’s as these tween bases are an instance. Have a local function that handles this tweens and have a event that when the tween completes, it destroys the tween base and disconnects the completed TweenBase.Completed event.

Doing these step will not only help the performance be less of a hog but reduce it to about a few lines.

4 Likes

i am scared of loops that dont loop ( pretty sure every one is) and when i saw this…

use loops please if i see it again i am gonna get a heart attak

3 Likes

He’s just a beginner and at-least he tried.

28 Likes

but seriously, USe LoOpS don’t skip learning things or learn things improperly take your time plz… or the next time i actually might die from a heart attak lol here is an

example
local tweens = {
tween1,
tween2,
tween3,
tween4
}
for i, v in next, tweens, nil do
 v:play()
end
2 Likes

Ok hm a flower need no code most of the time and when there is it just 4-11 lines. I think the code need to be less

2 Likes

Looks like that flower is getting some action

24 Likes
tweenservice=game:GetService("TweenService")
coin=script.Parent.Parent.Parent.Coin:GetChildren()
whiteflower=script.Parent.Parent.Parent.WhiteFlower:GetChildren()
clickdetector=script.Parent.ClickDetector

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 tweenplant_tween={}
local tweenYellowFlower_tween={}
local tweenWhiteFlower_tween={}
local tweenCoin={}

  for i,v in pairs(whiteflower)do
    if string.sub(v.Name,1,5)=="Plant"then
      local tween=TweenService:Create(v, Info1, TweenGoal1)
      table.insert(tweenplant_tween,i,tween)
    end
  end
end

  for i,v in pairs(whiteflower)do
    if string.sub(v.Name,1,5)=="White"then
      local tween=TweenService:Create(v, Info1, TweenGoal1)
      table.insert(tweenWhiteFlower_tween,i,tween)
    end
  end
  
  for i,v in pairs(whiteflower)do
    if string.sub(v.Name,1,5)=="Yello"then
      local tween=TweenService:Create(v, Info1, TweenGoal1)
      table.insert(tweenYellowFlower_tween,i,tween)
    end
  end

  for i,v in pairs(coin)do
    if string.sub(v.Name,1,5)=="CoinP"then
      local tween=TweenService:Create(v, Info1, TweenGoal1)
      table.insert(tweenCoin,i,tween)
    end
  end

local function turnoffCollision()
  for i,v in pairs(coin)do
    v.CanCollide=false
  end
end
local function turnonCollision()
  for i,v in pairs(coin)do
    v.CanCollide=false
  end
end

local function tweenplant()
  for i,v in pairs(tweenplant_tween)do
    v:Play()
  end
end

local function tweenWhite()
  for i,v in pairs(tweenWhiteFlower_tween)do
    v:Play()
  end
end

local function tweenyellow()
  for i,v in pairs(tweenYellowFlower_tween)do
    v:Play()
  end
end

local function tweencoin_Tween()
  for i,v in pairs(tweenCoin)do
    v:Play()
  end
end

clickdetector.MouseClick:Connect(function(player)
  local leaderstast= player.leaderstats
  local gold= leaderstast.Gold
  local cost=script.Parent.Parent.Parent.Cost
  if gold.Value >= cost.Value then
  gold.Value -= cost.Value
end)

next time along with format please include screenshot if possible
above code won’t work just an example

7 Likes

Okay, a more detailed and less off-topic reply.

First of all, tweens REALLY aren’t the way to go here. Use them for anything else.

Second of all, atleast attempt to clean your code before sending it off to the devforum.

Last but not least, let’s use this instead:

1. Create a AnimationController instance in your flower model.
2. Joint and weld your model together
3. Animate it in any program/plugin
4. Export the animation and save the ID somewhere (Priority must be action, and looped must be true)
5. Make a new script with the following code:

local animationId = "YOUR ID HERE"
local char = script.Parent
local animController = char:FindFirstChildOfClass("Humanoid") or 
char:FindFirstChildOfClass("AnimationController")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://" .. tostring(animationId)
local animTrack = animController:LoadAnimation(animation)
animTrack:Play(0,1,1)

(ig credit to roblox for this code)
6. And enjoy! :cool: Video example:


If you’re lazy to do these steps, go to this model

14 Likes

The replies in seeing are truly devastating and absolutely horrible to see. @Stanny_2003 ignore those disrespectful people, you are a beginner and you are learning which I completely respect.

I’m going to teach you a trick to reduce the number of tweens you create. There’s this thing called a for loop - a loop that goes a specific table/folder. You can use this to loop through all the flowers so that you don’t need to create separate tweens. If you need additional help for a boost, let me know. I’m here to help you.

68 Likes

I completely disagree with this message, why would you not try something new? I don’t see the point in dissing a new developer who is clearly not very experienced and it’s quite pathetic that this forum has come to be this way. Who remembers when people would actually give constructive criticism and helped others out instead of disrespecting them?

18 Likes

These comments are absolutely gut-wrenching, it’s alright to give constructive criticism, but you guys need to accept he’s a beginner, put yourself in his shoes and think if a bunch of people is coming after you with these comments, would you be motivated to continue? Of course, not, wake up and realize not everyone is on the same level as you, teach them and they’ll get better - as the quote goes "Give a man a fish and you’ve fed him for a day, teach a man to fish and you’ve fed him for a lifetime.

With that being said, Stanny there is something called a “for loop” and it would loop through an array/table/folder, etc. This helps a ton and reduces the lines of code needed, stay grinding and don’t listen to them, you got this! :muscle:t4: :muscle:t4:

31 Likes

Love it when self proclaimed game devs and programmers who haven’t done jack talk down to others like they’re some hot shot. Everyone starts here, he’ll be writing circles around you in no time.

26 Likes

You really are toxic person. Everyone starts from somewhere, instead of disrespecting a beginner we should respect them and teach them nicely. You started off as a bad programmer once, stop being disrespectful.

13 Likes

The disrespect is an atrocity buddy.

6 Likes

Hey instead of using 172 tweens which can cause massive issues such as memory issues, you might want to try using Animations for this.

You can checkout this dev hub post on how to do animations on models without humanoids

6 Likes