Hello,
I am working on game by myself where I learn to script a lot better than with help.
So In the game, I want a GUI to tween in a few seconds after respawn. How would I do it?
The way I used to do it was by, when they select the team, I would do :BreakJoints and then clone the GUI to starterGui. AFter doing that, I hadn't used studio for ages and so many changes have occured, it's so hard for me to adapt.
Now, that method doesn't work from my old game that I made, I had to improvise.
I can do the tweening bit using :TweenPosition(UDIm2.new(0,0,0,0) but I am not sure how I could do it AFTER a player has respawned, after death/reset, not when they join the game.
But how can I tell the GUI to only start tweening after the player has respawned. I don't want it to tween when they join the game, because I have other GUIs what are in place to help them to select their team.
Is there a function or something that I would say like OnRespawn to help the script know when to tween the gui. Or is it another way which I couldn't have thought of.
I just need the function or whatever to tell the script to tween the gui, i can do the rest of it myself, I think.
Thanks, TonyV

7 comments
Thanks a alot. I'll try now and if it works, I'll accept!
Can I ask, if I wanted to check the players team before tweening it, how would i go about doing this. Would i do if player.Team == 'oof' then (insert tweening)
I have updated the post for that.
I keep getting the output as PlayerGui is not a member of Player. This is from the part where I defined the frame that I want tweened. I put local gui = game.Players.LocalPlayer.PlayerGui.ScreenGui.ssa as the definition.
Make sure that this is a LocalScript and not a Script.
You should also define this after they are spawned again.
yep, i just did that and it worked. Thanks alot!