i feel like its really obvious. sorry
-- ignore this part, not the problem
local green = Color3.fromRGB(55, 175, 97)
local ts = game:GetService("TweenService")
local tweenOg = ts:Create(script.Parent,TweenInfo.new(1),{Color = green})
local debounce = false
local flowers = script.Parent.Parent:FindFirstChild("Flowers")
local function size(part)
local info = TweenInfo.new(1,Enum.EasingStyle.Quint,Enum.EasingDirection.Out)
local partProperties = {
Size = Vector3.new(21.884, 1.71, 23.563),
Transparency = 1
}
local tween = ts:Create(part,info,partProperties)
tween:Play()
end
-- ignore this part, not the problem
-- fade function
local function fade(part)
for i = 1,0,0.1 do
part.Transparency = i
wait()
end
end
-- fade function
script.Parent.Touched:Connect(function(limb)
local hum = limb.Parent:FindFirstChild("Humanoid")
if hum and not debounce then
debounce = true
script.Parent.Material = Enum.Material.Grass
local clone = script.Parent:Clone()
clone.Parent = script.Parent.Parent
clone:ClearAllChildren()
clone.CanCollide = false
clone.Name = "clone"
tweenOg:Play()
size(clone)
script.Parent.Material = Enum.Material.Grass
-- it's a model and i want every part in that model to fade in, thus i used "for i,v in pairs"
for i,v in pairs(flowers:GetChildren()) do
fade(v)
end
wait(3)
clone:Destroy()
script:Destroy()
end
end)
can't tell if im doing something wrong cuz im really lost lol..

1 comment
i havent scripted in a while so yeah