Hi there.
For some reason, when this runs, it completely skips the two seconds that the tween is supposed to be running for. it does it instantaneously. Any ideas?
01 | mouse.Button 1 Down:Connect( function () |
02 | animTrack:Play() |
03 | stop = false |
04 | while stop = = false do |
05 | wait() |
06 | for _,iore in ipairs (ore) do |
07 |
08 | if cursorObject.Parent.Name = = iore and magnitude < = 10 and hit = = false and cursorObject.Parent.Health.Value > 0 then |
09 | hitting = true |
10 | hit = true |
11 | local current = cursorObject.Parent.Name |
12 | local currenthealth = replicatedstorge:WaitForChild( "Health" ):InvokeServer(current) |
13 |
14 | local function executeAfter(complete) |
15 | print ( "hello" ) |
Hello, FierceLeviathan.
Upon further examination of your code, one thing that definitely sticks out as an issue is that you put:
1 | local tween 2 = progress:TweenSize( |
2 | UDim 2. new( 1 , 0 , 1 , 0 ), |
3 | Enum.EasingDirection.Out, |
4 | Enum.EasingStyle.Linear, |
5 | false , |
6 | 2 , |
7 | executeAfter |
8 | ) |
The main issue here is that the parameters of TweenSize are endSize, easingDirection, easingStyle, time, override, and callback.
With that being said, your code should look more like this:
1 | local tween 2 = progress:TweenSize( |
2 | UDim 2. new( 1 , 0 , 1 , 0 ), |
3 | Enum.EasingDirection.Out, |
4 | Enum.EasingStyle.Linear, |
5 | 2 , |
6 | false , |
7 | executeAfter |
8 | ) |
Best of luck!