So I'm currently trying to make a potion for my game, and I want it to make the player's character bigger.
local TweenService = game:GetService("TweenService")
local tool = script.Parent
local drink = tool.Drink
local drinkSound = tool["Drink Sound"]
local triggered = false
local function onActivated()
if not triggered then
triggered = true
drinkSound:Play()
local character = tool.Parent
local humanoid = character.Humanoid
local animTrack = humanoid:LoadAnimation(drink)
animTrack:Play()
for i, v in pairs(character:GetChildren()) do
if v:IsA("Part") then
local info = TweenInfo.new(
5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local goals = {
Size = Vector3.new(15, 15, 15);
}
local tween = TweenService:Create(v, info, goals)
else
-- ignore
end
end
wait(1.5)
triggered = false
end
end
tool.Activated:Connect(onActivated)
For some reason, the tween I made doesn't play. Can somebody help me? Thank you.
