Got it! Well, I did some modifications as you said and followed the guide, and the result was this:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.UserId, player.Name, player.DisplayName, " joined the experience")
local TextLabel = script.Parent.Frame
TextLabel.BackgroundTransparency = 1
TextLabel.Text = "Loading"
TextLabel.TextScaled = true
task.wait(5)
for index=0.1,1,1 do
TextLabel.BackgroundTransparency = index -- It is going to fade the frame background transparency in milliseconds.
task.wait(0.01)
end
task.wait(1.75)
print("Loaded.")
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
print("Today is " .. days[5])
end)
(Full code line of the script to understand the situation)
Once making the changes and played at Studio, nothing changed really… Not sure if it is missing other parts to make it 100% functional…
is this a loading screen as soon as the player joins? if so i’d approach it very differently. I don’t think playeradded even properly fires off of a gui when the player itself joins…
Regardless, if you want to access PlayerGui, its right on Player.PlayerGui, inside of playergui itll be structered the exact same as it was in startergui
IIRC (If I Remember Correctly), I made one LocalScript that fired and printed showcasing the player joining and leaving… But, continue further, yes, it is going to appear once the player spawns to the Baseplate!
You see, I tried doing that a bit before making this topic, yet, it gave me errors as it was not having the capacity to track the data class… Although, maybe as an alternative, this can work a bit?
Player gui is what the player sees and the place where changes to gui from scripts happens and Startergui is where you put it to replicate into all those players
I believe I got it in the first responses a bit above as PlayerGui being what the players see through the client and StarterGui restoring to players at the server… Although, I am still having difficulty applying the PlayerGui using the methods script.Parent.Frame + now Players:FindFirstChildOfClass("PlayerGui") above:
Yeah… I noticed that and immediately modified it! It looks like this now:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.UserId, player.Name, player.DisplayName, " joined the experience")
local TextLabel = script.Parent.Frame or Players:FindFirstChildOfClass("PlayerGui"):FindFirstChild(script.Parent.Frame)
TextLabel.BackgroundTransparency = 1
TextLabel.Text = "Loading"
TextLabel.TextScaled = true
task.wait(5)
for index=0.1,1,1 do
TextLabel.BackgroundTransparency = index
task.wait(0.01)
end
task.wait(1.75)
print("Loaded.")
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
print("Today is " .. days[5])
end)
So what you can do is in replicated storage add in a remote event called 'Joined and in serverscript servcie add in a normal script then check when the player joins with game.Players.PlayerAdded:Connect(function(player) game.ReplicatedStorage.Joined:FireClient(player) end)
then in a local script in screen gui do
game.ReplicatedStorage.Joined.OnClientEvent:Connect(function()
local TextLabel = script.Parent.Frame
TextLabel.BackgroundTransparency = 1
TextLabel.Text = "Loading"
TextLabel.TextScaled = true
task.wait(5)
for index=0.1,1,1 do
TextLabel.BackgroundTransparency = index
task.wait(0.01)
end
task.wait(1.75)
print("Loaded.")
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
print("Today is " .. days[5])
end)
Everything in startergui gets copied into playergui. Startergui is for you to be able to see and then the GUI gets copied in each player so they can individually screw around with it.