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.