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

[SOLVED] How do I make a GUI animation play when the player joins instead of everytime they reset?

Asked by 3 years ago
Edited 3 years ago

I have a LocalScript in StarterGui. I'm trying to get an animation to play when a TouchEnabled player joins, but everytime they die it replays again. Maybe I'm supposed to put the script somewhere else? I don't really know.

Edit: here's part of the script

local touchAnimationPlayed = false

if game:GetService("UserInputService").TouchEnabled == true then
    if touchAnimationPlayed == false then
        playAnimation()

        touchAnimationPlayed = true
    end
end
0
Please could you show the script? COOLGUY16T 37 — 3y
0
How much do you need? I edited the post with part of it because the full thing is 87 lines long (though it's all just assigning variables for tweenservice and then the function with the animation) NateMob1 18 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

There's a property of ScreenGui called "ResetOnSpawn" that I had to disable.

0
wait how do i close the thread and mark this as the answer NateMob1 18 — 3y
Ad

Answer this question