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

2 comments
Please could you show the script?
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)