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: Button1Down is not a valid member of HopperBin

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Jul 2011 02:37 PM
I understand completely what it means, but I don't know how to execute firing on click:


function create(mouse)
if script.Parent.Parent.Parent:FindFirstChild("Tank") ~= nil then
local Missle = Instance.new("Part")
local RP = Instance.new("RocketPropulsion")
RP.Parent = Missle
Missle.CFrame = script.Parent.Parent.Parent.Tank.MisslePoint.CFrame +Vector3.new(3, 0, 0)
RP.TargetOffset = mouse.Target.Position
end
end

script.Parent.Button1Down:connect(create) --HERE
Report Abuse
PompeyTheGreat is not online. PompeyTheGreat
Joined: 10 Apr 2011
Total Posts: 5615
11 Jul 2011 02:39 PM
script.Parent.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
if script.Parent.Parent.Parent:FindFirstChild("Tank") ~= nil then
local Missle = Instance.new("Part") --It's never parented ._.
local RP = Instance.new("RocketPropulsion")
RP.Parent = Missle
Missle.CFrame = script.Parent.Parent.Parent.Tank.MisslePoint.CFrame +Vector3.new(3, 0, 0)
RP.TargetOffset = mouse.Target.Position
end end) end)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Jul 2011 02:50 PM
Well no more Output message, but I'm not getting any responce from the tool
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Jul 2011 02:54 PM
Reload = 1

script.Parent.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
if script.Parent.Parent.Parent:FindFirstChild("Tank") ~= nil then
if Reload == 0 then return end
Reload = 0
local Kid = script.Parent.Parent
local Missle = Instance.new("Part")
MissleParent = Kid
local RP = Instance.new("RocketPropulsion")
RP.Parent = Missle
Missle.CFrame = script.Parent.Parent.Parent.Tank.MisslePoint.CFrame +Vector3.new(3, 0, 0)
RP.TargetOffset = mouse.Target.Position
wait(10)
Reload = 1

end end) end)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Jul 2011 03:11 PM
Bump
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