How would I make my gui pop up only once after seen?

Hey developers! So I made a “Update” type gui system where when a player joins the game, they get this gui pop up on there screen. And when they click on the “Close” button it disappears.

Here is the picture of the gui: image

Now, what I want to know is how would I make it as if when that same player rejoins the game, they don’t get the update gui pop up on there screen again? Basically as saying, you join the game, see the update log, play it for some time & leave, then you rejoin after a few hours and get the same pop up which you clicked “close” which sometimes can be a problem.

(Just starting on scripting, I’m new at it.)

3 Likes

Its pretty simple if you think about it.

So if there are more players in the game, the first one who clicked “Close” will make the gui dissapear for everyone. To avoid that we need to put the GUI inside Replicated First which will run for everyone only once. Like that we did 2 things in no time : if a player respawns, he wont see the GUI again , the GUI will be copied to everyone’s screen individually.

Good job on that!
Now , in order to actually make it work we need to create a LocalScript inside ReplicatedFirst. You can call it however you want, i will call it LoadingScreen.

local player = game.Players.LocalPlayer
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local GUI = script.IntroGUI:Clone()
GUI.Parent = PlayerGui

In the first 2 rows we defined each player. In the last 2 we copied the GUI you made and parented it to the local player’s screen.

After you defined whats important, you can define other things such as tweens.

In my case, i will just tween the main GUI we defined above.

player.CharacterAdded:Connect(function()
	print("Counting. Intro will begin soon!")

	wait(15)
			GUI.Main:TweenPosition(
		UDim2.new(1.1,0,-0.22,0),
		"InOut",
		"Quart",
		2,
		false,
		nil,
		false
		)
end)

To explain you, when a player loads his character, the game will print "Counting. Intro will begin soon!: and , after 15 seconds, the GUI will slide away.

The script is finished, now put the GUI inside the Local Script and you’re done!

If you want to test this, open a test server and check by yourself. Click close on one screen and if the other screen stays intact then you did it! You can also try clicking Close and then reseting. If this works, then u wont have any problems from now on understanding how to copy a GUI to each user’s screen.

image

8 Likes