#Conflict with tweens?

1 messages · Page 1 of 1 (latest)

livid pendant
#

im not sure if i have a conflict with my tweens here because the second one seems to not be playing

local TSInfo = TweenInfo.new(0.32, Enum.EasingStyle.Sine, Enum.EasingDirection.In)

local EndPos = hrp.CFrame * CFrame.new(Vector3.new(0,0,-1.1))
    
local PosTween = TS:Create(hrp, TSInfo, {CFrame = EndPos})
PosTween:Play()

task.wait(0.32)

local TSInfo = TweenInfo.new(0.18, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local EndPos = hrp.CFrame * CFrame.new(Vector3.new(0,0,-1.1))
ocal PosTween = TS:Create(hrp, TSInfo, {CFrame = EndPos})
PosTween:Play()
frosty ferry
#

local PosTween =

#

has already Play()

#

and ure doing Play() again

#

which will look like this

#

TS:Create(hrp, TSInfo, {CFrame = EndPos})
PosTween:Play():Play()

#

oh wait nvm

frosty ferry
#

yea

livid pendant
#

im not sure i understood

frosty ferry
#

no I read it wrong since this discord text box is so weird

livid pendant
#

its kinda weird yeah

frosty ferry
#

yea just change it to TweenPos2

livid pendant
#

ill give it a shot

livid pendant
#

maybe it is playing i just don't see it

#

il make a vid rq

frosty ferry
#

u want him to go back?

livid pendant
#

first step his leg support is his left, which is fine rn. the second step his support leg should be his right

#

so front again

frosty ferry
#

ok but waait

#

u got no errors

#

righ

#

and change TSInfo to TSInfo2

livid pendant
#

nothing

#

clear output

livid pendant
frosty ferry
#

sry to tell this but what exactly is not working

#

just say what is not working

livid pendant
#

all good, the second tween looks like its not working

#

actually

frosty ferry
#

cuz there is no reason to tween

livid pendant
#

i think i just fucked up the tween info

frosty ferry
#

u tween the hrp to the pos already in the first tween

#

and then in the second u wanna tween it again to that position even tho its already there

#

thats why u see no movement in the second tween

livid pendant
#

i tested with bigger values and it works, so i think theres just an issue between the scripted position tweens and the animation

frosty ferry
#

wait

#

why u got twice EndPos

livid pendant
#

uh

#

well cuz the player "dashes" twice

#

so 2 differant positionq

frosty ferry
#

u dont need it twice when it has the same value

livid pendant
#

oh that might be why its buggin i got an idea

#

lemme try something rq

frosty ferry
#

cuz both have the same Vector3

livid pendant
#

i just don't need the local before the second endPos then

#

but it shouldn't change anything right?

frosty ferry
#

yea

#

the first tween is the endPos

#

u just put it twice

#

which u dont need

#

and dont use task.wait(0.32)

livid pendant
#

should i just fire another event from the client side?

frosty ferry
#

instead use if PosTween.Completed then

livid pendant
#

oh i didn't know that was a thing

#

cool

frosty ferry
#

yea

frosty ferry
#

I mean the tween is fine

#

u just did it twice

livid pendant
#

better sync?

frosty ferry
#

no

#

local is better

#

than server

livid pendant
#

i try with one event per dash

#

worth a shot its not long anyway

frosty ferry
#

okay

#

but ure tween fine

livid pendant
#

pretty sure it is yeah

frosty ferry
#

but in future dont do the mistake to put the same variable

livid pendant
#

yeah i got lazy 😅

frosty ferry
#

like local

local Tween = 2```
#

the script will get confused which one is tween

#

same like when u have many instances called Part in workspace

#

and then u say like local Part = workspace.Part

#

the script wont know which one you mean

livid pendant
#

i got it

#

i think the second tweek was just not playing because of some obscure reasons. I just fired another event from the client when the second dash should start and it works like a charm

#

it works now im not gonna touch it anymore 😭