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: Owner only script.

Previous Thread :: Next Thread 
phorofor is not online. phorofor
Joined: 15 Feb 2010
Total Posts: 3986
25 Apr 2014 09:50 AM
I want to make a script where when I join a game it gives me a rocket launcher from Lighting but to no one else. I am very new at scripting so if someone could provide the script it would be extremely helpful.
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
25 Apr 2014 09:52 AM
Use server storage.

game.Players.PlayerAdded:connect(function(player)
if player.Name == "" then
game.ServerStorage.ROCKET:Clone().Parent = player.BackPack
end
end)
Report Abuse
phorofor is not online. phorofor
Joined: 15 Feb 2010
Total Posts: 3986
25 Apr 2014 09:54 AM
Thanks.
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
25 Apr 2014 09:56 AM
I typed that on the forums so I hope you know enough to make the names correct
e_e
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
25 Apr 2014 09:56 AM
Programming, use userId instead of name.

i.e

if player.userId == game.CreatorId then
--etc.


#nerdsunited
Report Abuse
phorofor is not online. phorofor
Joined: 15 Feb 2010
Total Posts: 3986
25 Apr 2014 10:02 AM
@Verified like I said I am new to scripting could you post the script because I keep getting errors when I type that in.
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
25 Apr 2014 10:03 AM
Why always everyone puts now on server storage? I will always put things like that in Lighting. This post was nothing with thread.
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
25 Apr 2014 10:05 AM
"Why always everyone puts now on server storage? I will always put things like that in Lighting. This post was nothing with thread."

Server storage is protected and MADE for this,

Lighting is not at all, it's basically parenting it to nil, but other scripts can get it.
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
25 Apr 2014 10:06 AM
game.Players.PlayerAdded:connect(function(player)
if player.userId == game.CreatorId then
game.ServerStorage['ROCKETNAME']:Clone().Parent = player.BackPack
end
end)

#nerdsunited
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
25 Apr 2014 10:07 AM
game.ServerStorage['ROCKETNAME']:Clone().Parent = player:WaitForChild('Backpack')*

#nerdsunited
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
25 Apr 2014 10:08 AM
Ouh. I never knew that xD
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