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: I am stupid.

Previous Thread :: Next Thread 
LbpPlayer34 is not online. LbpPlayer34
Joined: 08 Jul 2012
Total Posts: 523
14 Oct 2013 06:12 PM
function onButton1Down(mouse)
Tool = script.Parent
b = Instance.new("Part", game.Workspace)
b.FormFactor = "Ball"
b.TopSurface = "Smooth"
b.BottomSurface = "Smooth"
b.BrickColor = BrickColor.new("Really black")
b.Anchored = false
b.Position = Tool.Handle.Position
wait(4)
e = Instance.new("Explosion", b)
e.BlastPressure = 100
e.BlastRadius = 10
end

Tool.Equipped:connect(onEquippedLocal)

Output:
Position is not a valid member of Tool
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
14 Oct 2013 06:14 PM
You may have a Tool inside your Tool that you named Handle. Handle should be a part.
Also, where is your onEquippedLocal function?
Report Abuse
LbpPlayer34 is not online. LbpPlayer34
Joined: 08 Jul 2012
Total Posts: 523
14 Oct 2013 06:16 PM
you mean this?

local Tool = script.Parent;

enabled = true
function onButton1Down(mouse)
if not enabled then
return
end

enabled = false
mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

wait(7)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
enabled = true

end

function onEquippedLocal(mouse)

if mouse == nil then
print("Mouse not found")
return
end

mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end


Tool.Equipped:connect(onEquippedLocal)
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
14 Oct 2013 06:18 PM
Do you have two onButton1Down functions ... ?
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