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)
Main script: (LOCAL SCRIPT)
01 | local enabled = true |
02 | Player = script.Parent.Parent |
03 | mouse = Player:GetMouse() |
04 | run = game:GetService( "RunService" ) |
05 | function onKeyDown(key) |
06 | if not enabled then return end |
07 | enabled = 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.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
2ed script inside of that script: (REG SCRIPT)
01 | function 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 ) |
15 | end |
16 |
17 | script.Parent.Touched:connect(onDamage) |
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