Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Tweening - Why wont my tweening animation script work? how to fix it?

Asked by 3 years ago
Edited 3 years ago

im trying to make an animation thing, and i did some debugging, but no errors are left, so i checked through my code using print but everything does what its supposed to and script after the tween works, but why wont the tween work? i looked it up. here is part of my card trust me this is all youll need. I will answer questions.

i feel like this is one of those painfully obvious simple answers, but i just cant figure it out.

part of script:

elseif event == "deselect" and can == true then

        can = false
        selected = false

        part.s.Transparency = 1


        for i = 0,1,.1 do

            wait()
            game.Players.LocalPlayer.PlayerGui.TRIGGER_grabFishingPole.a.b.TextTransparency = i

        end


        ts = game.TweenService
        ti = TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out)
        properties = {Position = UDim2.new(-0.11, 0, 0.789, 0)}
        tween = ts:Create(game.Players.LocalPlayer.PlayerGui.TRIGGER_grabFishingPole.a, ti, properties)
        wait(1)



        game.Players.LocalPlayer.PlayerGui.TRIGGER_grabFishingPole.Enabled = false

        can = true

all help is appreciated thx

0
the gui is fine i tested everything, i testing n otweening it still works, its not the gui problem AlexanderYar 788 — 3y
0
I might be wrong but isn't it TweenSize Zelt3q 31 — 3y
0
Or tweenposition Zelt3q 31 — 3y
0
TweenService allows you to create a tween with any instance, and any property. deeskaalstickman649 475 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

The tween you have created is never played, and therefore never changes the properties. You will need to play the tween, by calling the :Play() function of the tween you have created

0
thanks i forgot lol AlexanderYar 788 — 3y
Ad

Answer this question