Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Welcome script not working, help?

Asked by
Oskee 0
10 years ago

I've tried 2 ways. One with replacing "repeat wait() until player:FindFirstChild("PlayerGui") pg=player:FindFirstChild("PlayerGui")" with "local pg=Player.Playergui, and one with the "repeat wait() until player:FindFirstChild("PlayerGui") pg=player:FindFirstChild("PlayerGui")". Neither work. Help?

game.Players.PlayerAdded:connect(function(player)
--[[
repeat wait() until player:FindFirstChild("PlayerGui")
pg=player:FindFirstChild("PlayerGui")   
--]]
local pg=player.PlayerGui
pg.UI2.Frame.Welcome.Text="Welcome to the Centre, " ..player.Name.. " please abide to ze rules"
end)

1 answer

Log in to vote
0
Answered by
DevChris 235 Moderation Voter
10 years ago

If this doesn't work, then try it in-game and press F9. Go to Server Console and if anything is red and you think it's from this script, comment it below.

game.Players.PlayerAdded:connect(function(player)
local pg = player:WaitForChild("PlayerGui")
pg.UI2.Frame.Welcome.Text = "Welcome to the Centre, " ..player.Name.. " please abide to ze rules"
end)
Ad

Answer this question