Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My "Owner joined announcer in chat" script works on studio, but not in game?

My script is just making a chat message when the owner enters, this is my script:

Owner = "Velege1"

function Join(plyr) if plyr.Name == Owner then game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = ("[SERVER]: Owner (Velege1) has entered the game."); Color = Color3.new(255,255,255); Font = Enum.Font.SourceSansBold; FontSize = Enum.FontSize.Size18; }) end

end game.Players.PlayerAdded:connect(Join)

It works on studio, but not on my game.

2 answers

Sorry, here is the script i used, i'm not ussing comments because it won't show it properly

Owner = "Velege1"

function Join(plyr) if plyr.Name == Owner then game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = ("[SERVER]: Owner (Velege1) has entered the game."); Color = Color3.new(255,255,255); Font = Enum.Font.SourceSansBold; FontSize = Enum.FontSize.Size18; }) end

end game.Players.PlayerAdded:connect(Join) --

3 comments

0

Really...

0

In the future when you need to make changes, you can just edit your question instead of posting under your own question.

0

Put this in a codeblock?

What you wrote isn't that bad, but that's not how you do it. Try this:

local Owner = "Velege1"

game.Players.PlayerAdded:connect(function(player)
	if player.Name == Owner then
		repeat wait() until player:WaitForChild("PlayerGui")
		--You gotta specify the gui and its full childs, or that won't work. Because of that, I'm gonna use player.PlayerGui.TestGui.TestFrame.TestTextLabel(.Property). You gotta change that with the correct directory.
		player.PlayerGui.TestGui.TestFrame.TestTextLabel.Text = "[SERVER]: Owner (Velege1) has entered the game."
		player.PlayerGui.TestGui.TestFrame.TestTextLabel.TextColor3 = Color3.new(255/255, 255/255, 255/255)
		player.PlayerGui.TestGui.TestFrame.TestTextLabel.Font = Enum.Font.SourceSansBold
		player.PlayerGui.TestGui.TestFrame.TestTextLabel.FontSize = Enum.FontSize.Size18

This discussion is preserved as it was. New answers, comments, and votes are closed.