|
| 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 |
|
|
|
| 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 |
|
|
|
| 11 Jul 2011 02:50 PM |
| Well no more Output message, but I'm not getting any responce from the tool |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|