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
 

Button1Down not firing

Previous Thread :: Next Thread 
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
21 Apr 2012 12:03 PM
tool = script.Parent
dmg = 1



function oreCheck()
if hit:FindFirstChild("Health") then
for i,v in pairs(ores) do
if hit.Name == v and hit:FindFirstChild("Health") then
return true
end
end
end
end

function checkCell(vct)
for i,v in pairs(Workspace.Mine:GetChildren()) do
if v.Position == vct then
return true
else
return false
end
end
end

function clearOre(ore)
for i,v in pairs(ore:GetChildren()) do
if v.className == "Decal" or v.className == "Texture" then
v:Destroy()
end
end
end

function createBrick(pos)
gemRare = math.random(1,50)
print(gemRare)
if gemRare < 51 then --Stone
gem = game.Lighting.Stone:clone()
gem.CFrame = CFrame.new(pos)
end
end




tool.Selected:connect(function(mouse)
print("Selected") --- Prints this
mouse.Button1Down:connect(function()
print("Pressed") -- NEVER prints this.
hit = mouse.Hit
if oreCheck then
ore = hit
print("Pressed ore")
if oreCanCollide == true then
print("Non-dug brick")
ore.Health.Value = ore.Health.Value - dmg
print(ore.Health.Value)
if ore.Health.Value <= 0 then
print("Ore no health")
ore.Transparency = 1
ore.CanCollide = false
clearOre(ore)
-- Create Animation DUN DUN DUN?!!?!??!!??!!?
-- Check axis
-- Bottom
first = Vector3.new(0,0,ore.Size.Y/2,0)
add = first*2
if checkCell(ore.Position - add) then
print("No need for brick FACE BOTTOM")
else
createBrick(ore.Position - add)
end
-- Top
first = Vector3.new(0,0,ore.Size.Y/2,0)
add = first*2
if checkCell(ore.Position + add) then
print("No need for brick FACE TOP")
else
createBrick(ore.Position + add)
end
-- Left
first = Vector3.new(ore.Size.X/2,0,0,0)
add = first*2
if checkCell(ore.Position - add) then
print("No need for brick FACE LEFT")
else
createBrick(ore.Position - add)
end

-- Right
first = Vector3.new(ore.Size.X/2,0,0,0)
add = first*2
if checkCell(ore.Position + add) then
print("No need for brick FACE RIGHT")
else
createBrick(ore.Position + add)
end

-- Front
first = Vector3.new(ore.Size.Z/2,0,0,0)
add = first*2
if checkCell(ore.Position + add) then
print("No need for brick FACE FRONT")
else
createBrick(ore.Position + add)
end

-- Back
first = Vector3.new(ore.Size.Z/2,0,0,0)
add = first*2
if checkCell(ore.Position - add) then
print("No need for brick FACE FRONT")
else
createBrick(ore.Position - add)
end
end
end
end
end)
end)

I have tried this as a local and a normal script. This is in a hopperbin.
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
21 Apr 2012 12:26 PM
Bump
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Apr 2012 12:28 PM
[ Content Deleted ]
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
21 Apr 2012 12:30 PM
hopperbin.Selected

It prints Selected but not Pressed
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Apr 2012 12:32 PM
[ Content Deleted ]
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
21 Apr 2012 12:33 PM
> I have tried this as a local and a normal script. This is in a hopperbin.


xD
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Apr 2012 12:36 PM
[ Content Deleted ]
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
21 Apr 2012 12:37 PM
Hopperbins are acting stupid. Their events don't work anymore.

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Apr 2012 12:38 PM
[ Content Deleted ]
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
21 Apr 2012 12:42 PM
WHAT?!?!?!??!?!?!?!?!?
Ugh WHEN FIXED?
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