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 » Scripters
Home Search
 

Re: Can you explain this code does

Previous Thread :: Next Thread 
2090mazmaz is not online. 2090mazmaz
Joined: 09 Oct 2012
Total Posts: 567
14 Sep 2015 07:05 PM
It's an old script that me and my friend made I kinds know what it does by I just need to make sure it's right

local part=game.Workspace.Part
local clone=part:Clone()
local moneyName = "DNA Samples"
local moneyToGive = 1
local initialParent=part.Parent
function handle(obj)

for i, v in pairs(game.Players:GetPlayers()) do
if v.Character and obj:IsDescendantOf(v.Character) and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health>0 then--Checks to make sure the part is 100% a living player
local cash = game.Players[v].leaderstats[moneyName]
cash.Value = cash.Value + moneyToGive
if part then
part:Destroy()
wait(5)
part=clone:Clone()
part.Parent=initialParent
part.Touched:connect(handle)
end
end
end
end
part.Touched:connect(handle)
Report Abuse
2090mazmaz is not online. 2090mazmaz
Joined: 09 Oct 2012
Total Posts: 567
14 Sep 2015 07:10 PM
Bumb1
Report Abuse
2090mazmaz is not online. 2090mazmaz
Joined: 09 Oct 2012
Total Posts: 567
14 Sep 2015 07:16 PM
Anyone
Report Abuse
2090mazmaz is not online. 2090mazmaz
Joined: 09 Oct 2012
Total Posts: 567
14 Sep 2015 07:25 PM
Wow guys come on
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:26 PM
stop bumping give me a sec


i dont need a siggy
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:27 PM
gives the person who touches + the x amount of money


i dont need a siggy
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:27 PM
and then after, what it does is it removes the part for 5 secs and re-makes it


i dont need a siggy
Report Abuse
2090mazmaz is not online. 2090mazmaz
Joined: 09 Oct 2012
Total Posts: 567
14 Sep 2015 07:28 PM
And deletes the part
Report Abuse
EgoMoose is not online. EgoMoose
Joined: 04 Feb 2009
Total Posts: 2896
14 Sep 2015 07:28 PM
It breaks.

You only gave us some of the code(?) and what you did give use has some flaws that would stop it from running.
Report Abuse
EgoMoose is not online. EgoMoose
Joined: 04 Feb 2009
Total Posts: 2896
14 Sep 2015 07:29 PM
Oh my mistake, I didn't see the handle function. Sorry bout that!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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