[SOLVED] My fire ball ability isn't working?
Asked by
3 years ago Edited 3 years ago
Hello! its me again, so theres a Boss Morph ive maded with abilities, However it doesn't seems the fire ball script working..
Again i will be grateful for every possible help!
Local Script Code:
01 | local UserInt = game:GetService( "UserInputService" ) |
02 | local Player = game.Players.LocalPlayer |
03 | local Character = script.Parent |
04 | local Mouse = Player:GetMouse() |
05 | local Remote = game.ReplicatedStorage.Abilities.SkullAbility |
07 | UserInt.InputBegan:Connect( function (input, gameProcessed) |
08 | if input.KeyCode = = Enum.KeyCode.Q then |
09 | Remote:FireServer(Mouse.Hit.p) |
Server Code:
01 | local RS = game:GetService( "ReplicatedStorage" ) |
02 | local Skull = RS:WaitForChild( "SkullAbility" ) |
07 | Skull.OnServerEvent:Connect( function (player, Mouse, Character) |
09 | local Fireball = Instance.new( "Part" ) |
10 | Fireball.Parent = workspace |
11 | Fireball.CFrame = Character:WaitForChild( "HumanoidRootPart" ).CFrame |
12 | local Mesh = Instance.new( "SpecialMesh" ) |
13 | Mesh.Parent = Fireball |
16 | Fireball.CanCollide = false |
17 | Mesh.Scale = Vector 3. new( 2 , 3.2 , 3.2 ) |
18 | Fireball.CFrame = CFrame.new(Fireball.Position, Mouse.Hit.p) |
19 | game.ReplicatedStorage.Skull.Damage:Clone().Parent = Fireball |
20 | local Particle 1 = game.ReplicatedStorage.Skull.Particle 1 :Clone() |
21 | local Particle 2 = game.ReplicatedStorage.Skull.Particle 2 :Clone() |
22 | Particle 1. Parent = Fireball |
23 | Particle 2. Parent = Fireball |
26 | local Bv = Instance.new( "BodyVelocity" ) |
28 | Bv.MaxForce = Vector 3. new( 30000 , 30000 , 30000 ) |
29 | Bv.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 100 |