|
function onAdded(player)
local msg = Instance.new("Message")
msg.Parent = game.Workspace
if (player.Name == "galisprayo") then
msg.Text = "The creator came for a visit! Hi galisprayo!"
wait(5)
msg:Remove()
else if (player.Name ~= "galisprayo") then
msg.Text = player.Name.. "has joined!"
wait(5)
msg:remove()
end
end
end
game.Players.ChildAdded:connect(onAdded) |
|
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
not sure 'bout the space between name.. and "blah" |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
Remove an end, and change "else if" to "elseif" |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
umm... what's the difference between elseif and else? not much really is there? just put the if at the end of the line above instead of the front... confusing i know |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
Well, it could be like
if p==nil and pp~=nil then print("blah")
elseif p~=nil and pp~=nil then print("pie") |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
I just mean a situation where you use elseif. |
|
Dr01d3k4Join Date: 2007-10-11 Post Count: 17916 |
function onAdded(player)
local msg = Instance.new("Message")
msg.Parent = game.Workspace
if (player.Name == "galisprayo") then
msg.Text = "The creator came for a visit! Hi galisprayo!"
wait(5)
msg:remove()
elseif (player.Name ~= "galisprayo") then
msg.Text = ""..player.Name.." has joined!"
wait(5)
msg:remove()
end
end
game.Players.ChildAdded:connect(onAdded) |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
it doesn't need that "".. in the player has joined part... |
|
Dr01d3k4Join Date: 2007-10-11 Post Count: 17916 |
Thats how I always do it and it works. Though you need the ..'s |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
It can be this:
function onAdded(player)
local msg = Instance.new("Message")
msg.Parent = game.Workspace
if (player.Name == "galisprayo") then
msg.Text = "The creator came for a visit! Hi galisprayo!"
wait(5)
msg:Remove()
elseif (player.Name ~= "galisprayo") then
msg.Text = player.Name.. " has joined!"
wait(5)
msg:remove()
end
end
game.Players.ChildAdded:connect(onAdded) |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
i made one of these before... it wasn't this confusing lol |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
yeah, because it's just you and no one disagrees with something ._. |
|
randomrobotTop 100 PosterJoin Date: 2007-07-02 Post Count: 11636 |
well, i mean, you're the only person who edits it, no one disagrees with a part in the script |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
^_^ you guys are disagreeing quite a lot today lol, it's ruining my Karma! |
|