of     1   

Inspectial
#140749193Friday, July 18, 2014 4:57 PM GMT

players = game.Players:GetPlayers() game.Players.PlayerAdded:connect(function(player) for _,v in pairs(players) do local s = Instance.new("ScreenGui",v.PlayerGui) local t = Instance.new("TextLabel",s) -- position is set at top left corner at default t.BackgroundColor3 = Color3.new(0/0/0/0) -- black t.TextColor3 = Color3.new(1/0/0/0) -- red t.Text = "Player joined: "..player.Name wait(4) s:Destroy() end end)
fret13103
#140749433Friday, July 18, 2014 5:00 PM GMT

Uh, there is an event already scripted just for this, make a function that is called by this event, and add your code, here I'll get you started: function onPlayerEntered(player) Lalalalalalalla (code) game.Players.PlayerAdded:connect(onPlayerEntered) onPlayerEntered(game.Players:WaitForChild("Player1")) Just so it works for testing too.
Krauzz
#140749683Friday, July 18, 2014 5:03 PM GMT

--players = game.Players:GetPlayers()This is your problem, this returns all the players in the server and will remain that way. It does not automatically update. So when you start your server, there will be no players, thus returning a nil table. Instead, you need to define players when the player actually joins. (So remove that part and put it in the event) game.Players.PlayerAdded:connect(function(player) local players = game.Players:GetPlayers() for _,v in pairs(players) do local s = Instance.new("ScreenGui",v.PlayerGui) local t = Instance.new("TextLabel",s) -- position is set at top left corner at default t.BackgroundColor3 = Color3.new(0/0/0/0) -- black t.TextColor3 = Color3.new(1/0/0/0) -- red t.Text = "Player joined: "..player.Name wait(4) s:Destroy() end end)
cornytime
#140749736Friday, July 18, 2014 5:04 PM GMT

function PlayerJoin() for _,v in pairs(game.Players:GetChildren())) do local s = Instance.new("ScreenGui", v.PlayerGui) local t = Instance.new("TextLabel", s) -- position is set at top left corner at default t.BackgroundColor3 = Color3.new(0/0/0/0) -- black t.TextColor3 = Color3.new(1/0/0/0) -- red t.Text = ("Player joined: "..player.Name) wait(4) s:Destroy() end end game.Players.PlayerAdded:connect(PlayerJoin) -- this?
Inspectial
#140749772Friday, July 18, 2014 5:04 PM GMT

Doesn't work & I want it all for all players. function onPlayerEntered(player) players = game.Players:GetPlayers() game.Players.PlayerAdded:connect(function(player) for _,v in pairs(players) do local s = Instance.new("ScreenGui",v.PlayerGui) local t = Instance.new("TextLabel",s) -- position is set at top left corner at default t.BackgroundColor3 = Color3.new(0/0/0/0) -- black t.TextColor3 = Color3.new(1/0/0/0) -- red t.Text = "Player joined: "..player.Name wait(4) s:Destroy() end end) end game.Players.PlayerAdded:connect(onPlayerEntered) onPlayerEntered(game.Players:WaitForChild("Player1"))
Inspectial
#140749957Friday, July 18, 2014 5:06 PM GMT

None work above my last post.
rny
#140750000Friday, July 18, 2014 5:06 PM GMT

game.Players.PlayerAdded:connect(function(player) local players = game.Players:GetChildren() for _,v in pairs(players) do coroutine.resume(coroutine.create(function() local s = Instance.new("ScreenGui",v.PlayerGui) local t = Instance.new("TextLabel",s) -- position is set at top left corner at default t.BackgroundColor3 = Color3.new(0,0,0) -- black t.TextColor3 = Color3.new(1,0,0) -- red t.Text = "Player joined: "..player.Name wait(4) s:Destroy() end)) end end)
Inspectial
#140750130Friday, July 18, 2014 5:08 PM GMT

@rny doesn't work ;(
rny
#140750276Friday, July 18, 2014 5:09 PM GMT

a error would help
Inspectial
#140750327Friday, July 18, 2014 5:10 PM GMT

it doesn't claim any errors.
rny
#140750470Friday, July 18, 2014 5:11 PM GMT

game.Players.PlayerAdded:connect(function(player) for _, v in pairs(game.Players:GetChildren()) do coroutine.resume(coroutine.create(function() local s = Instance.new("ScreenGui",v.PlayerGui) local t = Instance.new("TextLabel",s) t.BackgroundColor3 = Color3.new(0,0,0) t.TextColor3 = Color3.new(1,0,0) t.Text = "Player joined: ".. player.Name wait(4) s:Destroy() end)) end end)
Inspectial
#140750697Friday, July 18, 2014 5:13 PM GMT

nope @rny
Inspectial
#140750897Friday, July 18, 2014 5:15 PM GMT

This works, but I don't want it to be a hint, want it to be text on the bottom left that shows up(will change positioning when I at least get it to work, right now is postitioned at top left). game.Players.PlayerAdded:connect(function(player) local h = Instance.new("Hint",workspace) h.Text = "Player connected: "..player.Name wait(2) h:Destroy() end)
Inspectial
#140751771Friday, July 18, 2014 5:25 PM GMT

bump
fret13103
#140753248Friday, July 18, 2014 5:41 PM GMT

Well, you've just solved your own problem, instead of it being a hint, just make it a GUI. Wave your magic wand if that doesn't work.
Inspectial
#140762761Friday, July 18, 2014 7:24 PM GMT

Won't work though, you can see at my first post.

    of     1