generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Will this work?

Previous Thread :: Next Thread 
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 04:56 PM
function PlayerAdded(player)
if player:"alexangulo" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(player)
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
20 Jun 2012 04:58 PM
function PlayerAdded(player)
if player.Name == "alexangulo" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(player)
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
20 Jun 2012 04:59 PM
Forgot something.

function PlayerAdded(player)
if player.Name == "alexangulo" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 05:00 PM
Thanks TwoBoo.
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 05:22 PM
It's not working.
Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 05:25 PM
Dont you need to call the function at the end?
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 05:27 PM
What do you mean, I am very new at scripting?
Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 05:34 PM
Ah, nvm, his script works fine, just tested in my studio. Run it as a server and join as yourself, it should work
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 05:37 PM
--Created by AlexAngulo. Do not take credit.--

function PlayerAdded(player)
if player:IsInGroup(501284) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

function PlayerAdded(player)
if player:IsInGroup(501286) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

--A standard officer has entered the server

function PlayerAdded(player)
if player.Name == "alexangulo","XxalexanguloxX","alexangulo1","alexangulo97","LordAngulo" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(9)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "deadmatch1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Supreme General of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "robertaaron1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Prime Minister of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "Alex987654321213","Anderson03","mattman44","offcil80" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "General"..Player.name.."of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

--My executive board of SKR.

--Thank you for checking this script out.

That's the whole script.

Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 05:48 PM
Why cant you condense that all into one function, using elseif and such
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 05:50 PM
As said before, I am new to scripting.

Although, what should I do to fix this? May I get an example and such?
Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 05:52 PM
It would help if you could get an output
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 06:06 PM
Alright
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 06:10 PM
16:09:56 - Workspace....Entered the server (Announcement):26: 'then' expected near ','
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 06:17 PM
bump
Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 06:24 PM
Try this:

--Created by AlexAngulo. Do not take credit.--
local Kings = "alexangulo","XxalexanguloxX","alexangulo1","alexangulo97","LordAngulo"
local Generals = "Alex987654321213","Anderson03","mattman44","offcil80"
function PlayerAdded(player)
if player:IsInGroup(501284) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

function PlayerAdded(player)
if player:IsInGroup(501286) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

--A standard officer has entered the server

function PlayerAdded(player)
if player.Name == Kings then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(9)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "deadmatch1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Supreme General of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "robertaaron1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Prime Minister of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == Generals then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "General"..Player.name.."of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

--My executive board of SKR.

--Thank you for checking this script out.
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 06:41 PM
--Created by AlexAngulo. Do not take credit.--
local Kings = "alexangulo","XxalexanguloxX","alexangulo1","alexangulo97","LordAngulo"
local Generals = "Alex987654321213","Anderson03","mattman44","offcil80"
function PlayerAdded(player)
if player:IsInGroup(501284) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

function PlayerAdded(player)
if player:IsInGroup(501286) then
MsgHint=Instance.new("Hint",Workspace)
MsgHint.Text = "Officer"..player.Name.."has entered the server!"
wait(3)
MsgHint:Destroy()
end
end
game.Players.PlayerAdded:connect(player)

--A standard officer has entered the server

function PlayerAdded(player)
if player.Name == Kings then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(9)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "deadmatch1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Supreme General of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "robertaaron1" then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The Prime Minister of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == Generals then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "General"..Player.name.."of SKR has entered the server!"
wait(5)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

--My executive board of SKR.

--Thank you for checking this script out.

--Credits to sayhisam1 for assisting in the creation of this script. You saved my life c:

"Okay it works for me, yet it didn't for General offcil80"
Report Abuse
sayhisam1 is not online. sayhisam1
Joined: 25 Nov 2009
Total Posts: 2092
20 Jun 2012 06:52 PM
Np :)
About it not working for that one person, is it working for everyone else, or is it only working for some people?
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 07:29 PM
It worked for deadmatch1, which gets me to assume it will work for rob.

I am going to make each General their own message.
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 07:58 PM
--Created by AlexAngulo. Do not take credit.--
local Kings = "alexangulo","XxalexanguloxX","alexangulo1","alexangulo97","LordAngulo"
function PlayerAdded(player)
if player.Name == Kings then
Msg1=Instance.new("Message",Workspace)
Msg1.Text = "The King of SKR has entered the server!"
wait(9)
Msg1:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "deadmatch1" then
Msg2=Instance.new("Message",Workspace)
Msg2.Text = "The Supreme General of SKR has entered the server!"
wait(5)
Msg2:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "robertaaron1" then
Msg3=Instance.new("Message",Workspace)
Msg3.Text = "The Prime Minister of SKR has entered the server!"
wait(5)
Msg3:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "Anderson03" then
Msg4=Instance.new("Message",Workspace)
Msg4.Text = "The Field Marshal of SKR's Elite Syndicate has entered the server!"
wait(5)
Msg4:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "Alex987654321213" then
Msg5=Instance.new("Message",Workspace)
Msg5.Text = "The General of External Affairs for SKR has entered the server!"
wait(5)
Msg5:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "mattman44" then
Msg6=Instance.new("Message",Workspace)
Msg6.Text = "The Chairman of SKR's Assembly has entered the server!"
wait(5)
Msg6:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

function PlayerAdded(player)
if player.Name == "offcil80" then
Msg7=Instance.new("Message",Workspace)
Msg7.Text = "The Civilian Directorate of SKR has entered the server!"
wait(5)
Msg7:Destroy()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)


--My executive board of SKR.

--Thank you for checking this script out.

--Credits to sayhisam1 for assisting in the creation of this script. You saved my life c:

This should work.
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
20 Jun 2012 08:07 PM
I have made the script public, it officially works. :3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image