Project 580: Minecraft in Roblox - Part Three

2. Add a Toughness Value to the Blocks Being Placed

Inside the 'makeBlock' function of your block tool, make an integer value called 'toughness' and set it equal to how tough you want the material to be. This will dictate how long it takes to break a block.
This challenge doesn't have a starting point

Steps

1. Find the 'makeBlock' function in your Block script

In the code for your block, find the function called 'makeBlock' and add a new line after setting the block's name to "Block".

2. Create a new instance of 'IntValue' called toughness

Create a new local variable called 'toughness' and set it equal to a new instance of 'IntValue'.
local toughness = Instance.new("IntValue")

3. Set the name to "Toughness"

Set 'toughness.Name' equal to "Toughness".
toughness.Name = "Toughness"

4. Make 'block' the parent of 'toughness'

Set the parent of 'toughness' equal to 'block'.
toughness.Parent = block

5. Set the value of 'toughness'

Set 'toughness.Value' equal to a number between 1 and 6. This will effect how long it takes to break a block made of that material.
toughness.Value = 5