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: Need help please!

Previous Thread :: Next Thread 
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
25 Nov 2013 07:37 PM
I have a giver, how would I make it only give 1 weapon when you touch it so you can't keep getting swords each time you touch it. Thanks!
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
25 Nov 2013 07:38 PM
Make it check if you already have a sword in your Backpack before giving them the sword.
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
25 Nov 2013 07:39 PM
How would I do that?
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
25 Nov 2013 07:41 PM
script.Parent.Touched:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") then
if game.Players:FindFirstChild(p.Parent.Name).Backpack:FindFirstChild("Sword") then
print("Already has sword")
else
game.Lighting.Sword:Clone().Parent = game.Players:FindFirstChild(p.Parent.Name)
end
end
end)

Try that, I'm a little rusty.
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
25 Nov 2013 07:42 PM
Change

game.Lighting.Sword:Clone().Parent = game.Players:FindFirstChild(p.Parent.Name)

to

game.Lighting.Sword:Clone().Parent = game.Players:FindFirstChild(p.Parent.Name).Backpack
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
25 Nov 2013 07:44 PM
It doesn't work
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
25 Nov 2013 07:44 PM
I will try that
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
25 Nov 2013 07:45 PM
Still gives me more than 1 sword
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