I want the label to display certain text, but it doesn’t.
I am using a local script and it still doesn’t work, I am unsure if there’s an error in my code.
Here’s the script:
local Players = game:GetService("Players")
local ThingText = game.StarterGui.IfPlayerJoined.Frame.TextJoin
Players.PlayerAdded:Connect(function(player)
ThingText.Text = "Welcome, " .. player.Name
end)
You can just use game:GetService("Players").LocalPlayer as its in a localscript
Also, you defined the StarterGui and not the PlayerGui
local Player = game:GetService("Players").LocalPlayer
local ThingText = script.Parent --set to wherever your textlabel is
ThingText.Text = "Welcome, " .. Player.Name