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: Scripting Weapons

Previous Thread :: Next Thread 
Sharkdemon is not online. Sharkdemon
Joined: 31 Jul 2009
Total Posts: 41
25 Sep 2012 07:35 PM
zeta = game.Players.zethal -- This is just letting the script know who owns it
tool = Instance.new("Tool") -- Abra Shazam, We have a Tool
tool.Parent = zeta.Backpack -- And now it has a home!
tool.Name = "Nineza's Whim" -- Oh look, now it has a name!
h = Instance.new("Part") -- Abra Shazam, I need a part to hold!
h.Parent = tool -- And now it has a home in our new tool!
h.Name = "Handle" -- And now we have something to call it!
h.Size = Vector3.new(1,4,1) -- What Size Shall you be oh mighty Brick!
h.BrickColor = BrickColor.new("Really black") -- I now say you are black!
hmsh = Instance.new("CylinderMesh") -- Abra Shazam, I desire fancy looks!
hmsh.Parent = h -- Now yet it has a home!
h.Touched:connnect( -- This is telling it if our brick is touched please perform this action
function(hit) --- This just tells us we now have a variable for the object touching the brick
h = hit.Parent:findFirstChild("Humanoid") -- If our hitting object has a humanoid
if h ~= nil then --- and it is thereh.Health = h.Health - math.random(80,100) -- Perform this amount of damage to it's health
end -- This ends our If it is there
end) -- this ends the function for being touched as well as the ) for it ending >)
Report Abuse
Sharkdemon is not online. Sharkdemon
Joined: 31 Jul 2009
Total Posts: 41
25 Sep 2012 07:38 PM
>BUMP<
Report Abuse
Sharkdemon is not online. Sharkdemon
Joined: 31 Jul 2009
Total Posts: 41
25 Sep 2012 07:44 PM
Is this helpful? Say "support" if it is...
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
25 Sep 2012 07:44 PM
?
Report Abuse
Sharkdemon is not online. Sharkdemon
Joined: 31 Jul 2009
Total Posts: 41
25 Sep 2012 07:46 PM
This is the code you enter...when u make a fresh script
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