Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont this gun fire?

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!

2 comments

0

Hold on

0

Anyone? Please help.

2 answers

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.

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

1 comment

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.