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: HELP!

Previous Thread :: Next Thread 
nullmario45 is not online. nullmario45
Joined: 13 Nov 2010
Total Posts: 1720
09 Jun 2013 10:08 AM
So I need a script where when you touch the block it takes a certain Gear from you.
So far I have this.

for i, v in pairs (Roblox.IDKTHIS.Inventory:children()) do
if v:IsA("Darkheart") then
v.Parent = Roblox.IDKTHIS.Inventory
end
end

I need it so it takes it from the players inventory and gets rid of it...
(I stink at scripting)

¤ᶯᶸᶩᶩᶬ¤
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
09 Jun 2013 10:21 AM
part.Touched:connect(function(hit)
if (hit and hit.Parent) then
local player = game.Players:FindFirstChild(hit.Parent.Name)
if (player) then
local darkHeart = player.Backpack:FindFirstChild("Darkheart")
if (darkHeart) then
darkHeart:Destroy()
end
end
end
end)

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
nullmario45 is not online. nullmario45
Joined: 13 Nov 2010
Total Posts: 1720
09 Jun 2013 10:57 AM
I just change darkheart to The gear I want right...

¤ᶯᶸᶩᶩᶬ¤
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
09 Jun 2013 01:31 PM
Yup.

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
richkid9020 is not online. richkid9020
Joined: 15 Feb 2011
Total Posts: 360
09 Jun 2013 02:31 PM
:P

~ℜℹↄℏ
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
09 Jun 2013 02:34 PM
^ What was the point of posting that?

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
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