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

[SOLVED] My fire ball ability isn't working?

Asked by
vileras 22
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:

local UserInt = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Mouse = Player:GetMouse()
local Remote = game.ReplicatedStorage.Abilities.SkullAbility

UserInt.InputBegan:Connect(function(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.Q then
        Remote:FireServer(Mouse.Hit.p)
    end
end)

Server Code:

local RS = game:GetService("ReplicatedStorage")
local Skull = RS:WaitForChild("SkullAbility")




Skull.OnServerEvent:Connect(function(player, Mouse, Character)
    wait(0.9)
    local Fireball = Instance.new("Part")
    Fireball.Parent = workspace
    Fireball.CFrame = Character:WaitForChild("HumanoidRootPart").CFrame
    local Mesh = Instance.new("SpecialMesh")
    Mesh.Parent = Fireball
    Mesh.MeshId = "http://www.roblox.com/asset/?id=4770583"
    Mesh.TextureId = "http://www.roblox.com/asset/?id=76745352"
    Fireball.CanCollide = false
    Mesh.Scale = Vector3.new(2, 3.2, 3.2)
    Fireball.CFrame = CFrame.new(Fireball.Position, Mouse.Hit.p)
    game.ReplicatedStorage.Skull.Damage:Clone().Parent = Fireball
    local Particle1 = game.ReplicatedStorage.Skull.Particle1:Clone()
    local Particle2 = game.ReplicatedStorage.Skull.Particle2:Clone()
    Particle1.Parent = Fireball
    Particle2.Parent = Fireball


    local Bv = Instance.new("BodyVelocity")
    Bv.Parent = Fireball
    Bv.MaxForce = Vector3.new(30000,30000,30000)
    Bv.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 100
end)

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

In the localscript it looks inside ReplicatedStorage.Abilities for "SkullAbility" but on the server side it only looks inside ReplicatedStorage

Ad

Answer this question