Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Why wont this gun fire?

Asked by 10 years ago
MouseButton1Down:connect(shoot)
if script.Parent.Checker.BrickColor == "Bright Green" then
    script.Parent.Checker.BrickColor = "Really Red"
local clone = game.Lighting.Bullet:clone()
clone.Name = "Bullet"
clone.Parent = game.Workspace
clone.Parent = mouse.hit
end

Please someone help!

0
Hold on DevShowcase 0 — 10y
0
Anyone? Please help. DevShowcase 0 — 10y

2 answers

Log in to vote
-1
Answered by 10 years ago

Try this.

mouse = GetMouse()
mouse.Button1Click:connect(function()
    if script.Parent.Checker.BrickColor == "Bright Green" then
    script.Parent.Checker.BrickColor = "Really Red"
local clone = game.Lighting.Bullet:clone()
clone.Name = "Bullet"
clone.Parent = game.Workspace
clone.Parent = mouse.hit
end)

I am sure this will work.

Ad
Log in to vote
-2
Answered by
KAAK82 16
10 years ago
script.Parent.Activated:connect(function()) --Activated is wen the Tool is Equipped AND you Click and plus, u forgot to do (function()) cos if u call a function before even loading it, u need that...
if script.Parent.Checker.BrickColor == "Bright Green" then
    script.Parent.Checker.BrickColor = "Really Red"
local clone = game.Lighting.Bullet:clone()
clone.Name = "Bullet"
clone.Parent = game.Workspace
clone.Parent = mouse.hit
end
0
wat Idiot Thumbs Down on this??? Activated is the Event for an Equipped Tool! The Dumb-Hole that Thumbs Down, come on then... lets see ur Answer! KAAK82 16 — 10y

Answer this question