Tween runs only once, why?

Why does the Tween run only once and then it just doesn’t work?
Here is the part of the code which runs only once:

2 Likes

can you send the actual script itself not the image, its hard to see and check where you missed and hard to quote

Which part only runs once? The soundended event, there are three tweens, the changed event?
What is it you are expecting to happen?
Could you add prints to the different events to demonstrate which part has stopped, and what is the code playing the sound?

TweenInfo.new(time: number, easingStyle: EasingStyle, easingDirection: EasingDirection, repeatCount: number, reverses: boolean, delayTime: number)

You only set the time for your TweenInfo
What you could do is use:

local Delay = 0
local Duration = 1
local Style = Enum.EasingStyle.Linear
local Direction = Enum.EasingDirection.In
local Loops = -1 -- negative loops forever, 0 doesn't loop...
local Reverse = false -- works if Loops >= 1
local TweenInfo = TweenInfo.new(Duration, Style, Direction, Loops, Reverse, Delay)

local Tween = TweenService:Create(NumberValue, TweenInfo, {Value = 1})
1 Like

I’m really sorry for not answering in time, but thanks! It worked for me. The problem was that everytime I say in the chat: Colossal Titan - the tween would occur and it did, but obviously I had to give all of the parameters including repeatCount for tween to work every message.

2 Likes

I’m sorry for not giving more information about the code.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.