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: What's the best scripting method to create a block feature?

Previous Thread :: Next Thread 
Creepcruncher is not online. Creepcruncher
Joined: 17 Nov 2012
Total Posts: 3396
21 May 2016 01:29 PM
Say if I make something like a LinkedSword scripted weapon, is there a script function that can cause a shield to nullify damage made by said weapon?

I'm currently thinking of making a game, but I'm not sure whether I'm good enough to create it.


rawr, everybody walk the dinosaur ༼ つ ◕_◕ ༽つ || www.roblox.com/Was-Not-Was-Walk-The-Dinosaur-item?id=345639779
Report Abuse
killerbot29003 is online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
21 May 2016 01:49 PM
Here's an example:

local damage = 1337
local resistance = 0.5 --pretty sure percents don't work

print(math.floor(damage * resistance))


This siggy is copyrighted ©
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
21 May 2016 01:51 PM
Aside from percentages being super overrated.
I prefer decimal fractions.


Report Abuse
Creepcruncher is not online. Creepcruncher
Joined: 17 Nov 2012
Total Posts: 3396
21 May 2016 05:03 PM
Thanks!


rawr, everybody walk the dinosaur ༼ つ ◕_◕ ༽つ ||
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