Here's my code. I want it to have different colors, text, flashing text, textbox, etc. Thanks in advance.
game.Players.PlayerAdded:connect(function(player) if player.Name == "jmotoyama" then local f = Instance.new("TextBox", game.Workspace) f.Text = "Never fear, Jm the FT God is here." wait(4) f:Remove() wait(1) end end)
game.Players.PlayerAdded:connect(function(player) if player.Name == "qitsi" then local f = Instance.new("Hint", game.Workspace) f.Text = "qitsi, the Tower Tormentor has arrived." wait(4) f:Remove() wait(1) end end)
game.Players.PlayerAdded:connect(function(player) if player.Name == "Tentameans" then local f = Instance.new("Hint", game.Workspace) f.Text = "Tentameans, the center/flat God has arrived." wait(4) f:Remove() wait(1) end end)
game.Players.PlayerAdded:connect(function(player) if player.Name == "EnterTime" then local f = Instance.new("Hint", game.Workspace) f.Text = "EnterTime, Best SF'er is here. " wait(4) f:Remove() wait(1) end end)
game.Players.PlayerAdded:connect(function(player) if player.Name == "iHateDex298" then local f = Instance.new("Hint", game.Workspace) f.Text = "Stand in the fire, DPS higher. iHateDex298 has arrived." wait(4) f:Remove() wait(1) end end)
game.Players.PlayerAdded:connect(function(player) if player.Name == "PestLine" then local f = Instance.new("Hint", game.Workspace) f.Text = "Hakuna Matata. PestLine has arrived." wait(4) f:Remove() wait(1) end end)
You would have to learn how to make a Gui. Making a Gui is quite easy and you don't have to know any code to do it. However, to make that Gui functional, you will have to learn a bit of code. Here is a basic tutorial on making some Gui's. Now, as for the code part, I can help you out with that.
Have this script in the Workspace as a normal script:
p=Instance.new("StringValue", game.Workspace) p.Name="NewPlayer" game.Players.PlayerAdded:connect(function(player) p.Value=player.Name end)
Now, put this script inside the TextLabel that you have inside the StarterGui that you have made that you want the text to show who entered the game (I recommend this being a local script):
p=game.Workspace:WaitForChild("NewPlayer") script.Parent.Text=p.Value.." has entered the game!" wait(5) script.Parent.Visibel=false p.Changed:connect(function() script.Parent.Visible=true script.Parent.Text=p.Value.." has entered the game!" wait(5) script.Parent.Visible=false end)
Now, this is a basic way to show that someone has entered the game. This might need some work done on the code but it should work perfectly for now.
To do that, you should use GUIs. Hints are (unfortunately) deprecated, and not flexible enough for your needs.
Also, instead of connecting separate events for each condition, simply use:
if x then ... elseif y then ... elseif z then etc... end
It's cleaner, and, from my experience, much faster.
EDIT: To do that, you would first make a ScreenGui in the StarterGui. Then, you should use TextLabels instead of hints. These need to be placed in every player's PlayerGui, in the ScreenGui. The ScreenGui is copied to the PlayerGui, in case you're wondering.
for i, v in ipairs(game.Players:GetChildren()) do local Label = Instance.new("TextLabel", v.PlayerGui.ScreenGui) Label.Size = UDim2.new(1, 0, 0.05, 0) Label.Text = "Insert text here" -- Modify other properties here. end
I've also set the position to a decent value. You can see all the properties of the TextLabel here. For example, to change the background colour, we do this:
Label.BackgroundColor3 = Color3.new(1, 0, 1) -- A purple colour
I hope this helps.
Not experienced in coding. How do I put the GUI in? And also, how do I make the GUI center in minimized or maximized screen?