Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

0

Please could you show the script?

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)

1 answer

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

1 comment

0

wait how do i close the thread and mark this as the answer

This discussion is preserved as it was. New answers, comments, and votes are closed.