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

My Fireball Shooting Script Isn't Working, Help?

Asked by
Jxemes 75
7 years ago

I've been trying to make a game that is similar to Elemental Battlegrounds. I got a HopperBin, and a script I made. The problem is that it won't shoot. Anyone got any ideas?

01local me = game.Players.LocalPlayer
02local tool = script.Parent
03 
04local ws = game:GetService("Workspace")
05 
06tool.Selected:connect(function(mouse)
07mouse.Button1Down:connect(function()
08 
09handle = me.Character.Torso
10 
11local p = Instance.new("Part")
12p.CFrame = CFrame.new(handle.Position)
13p.TopSurface = "Smooth"
14p.BottomSurface = "Smooth"
15p.Shape = Enum.PartType.Ball
View all 32 lines...
0
lmao i got the answer that i wanted but there's more than 1 mistake Jxemes 75 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

(Hope you don't mind, but i added R15 compatibility.)

01local me = game.Players.LocalPlayer
02local tool = script.Parent
03 
04local ws = game:GetService("Workspace")
05 
06tool.Equipped:connect(function(mouse)
07mouse.Button1Down:connect(function()
08 
09handle = me.Character:FindFirstChild("Torso")
10if handle== nil then
11handle=me.Character.UpperTorso
12end
13 
14local p = Instance.new("Part")
15p.CFrame = CFrame.new(handle.Position)
View all 35 lines...

Use a tool, not a hopperbin. In the properties window, change the RequiresHandle Property of the tool to false.

0
Thanks! It works! Jxemes 75 — 7y
0
BTW im gonna find out how to make it explode and collide it on the ground :P Jxemes 75 — 7y
0
Hey if you want help with that, i can help :D Void_Frost 571 — 7y
Ad

Answer this question