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

Simple Fireball throwing?

Asked by 11 years ago

Can I get some help? I CanCollided some Fire with a Transparent ball and I wanted to script to where it causes damage (15 - 30 damage will be good) when you throw it. (No animation needed)

3 answers

Log in to vote
0
Answered by 11 years ago

Main script: (LOCAL SCRIPT)

01local enabled = true
02Player = script.Parent.Parent
03mouse = Player:GetMouse()
04run = game:GetService("RunService")
05function onKeyDown(key)
06if not enabled then return end
07enabled = false
08    Key = key:lower()
09    if key == "e" then
10        RightShoulder = Player.Character.Torso["Right Shoulder"]
11        LeftShoulder = Player.Character.Torso["Left Shoulder"]
12        Run = game:GetService("RunService")
13        for i = 1, 2 do
14            for i = 1, 12 do
15                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -0.16)
View all 72 lines...

2ed script inside of that script: (REG SCRIPT)

01function onDamage(Part)
02    if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
03        script.Disabled = true
04        f = Instance.new("Fire", Part)
05        for i = 1,25 do
06            f.Size = f.Size +0.25
07            Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -3
08            wait(0.05)
09        end
10        Part.Parent.Humanoid.Sit = true
11        f:remove()
12        script.Parent:remove()
13    end
14    wait(0.025)
15end
16 
17script.Parent.Touched:connect(onDamage)
Ad
Log in to vote
0
Answered by
Hybric 271 Moderation Voter
11 years ago

@Redstone you copied it from Friaza, just wow really...

Log in to vote
0
Answered by 10 years ago

Look, if you want to learn it, how to do it, all you gotta to is CFrame IF You want to be all fancy and unique. But, give it a shot without copying what RedStone posted just read it, get the Main Idea and give it a shot. If you manage to make it, you know you did a good job, if not, well you tried and you ask it again. It's better to try even though you fail. It's good to know if you were close or not

Answer this question