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

I am trying to make an ability like the Hallow Jack ability in Slap Battles, how can I do this?

Asked by 1 year ago

I'm trying to make an ability like the Hallow Jack ability from Slap Battles, but it never seems to work. I've tried everything I could think of, and still, I cannot find why it doesn't work.

-- Variables
local ss = game:GetService("ServerStorage")
local sword = ss.SwordAbility
local shockwave = ss.Shockwave
local tweensizeshockwave = ss.WaveTweenSizeMaterial
local plrs = game:GetService("Players")
local tweens = game:GetService("TweenService")
-- Functions
local function createShockwave(positionc)
    local shockwaveclone = shockwave:Clone()
    shockwaveclone.Parent = workspace
    shockwaveclone.Position = positionc
    print("Shockwave added")
    local tweentrans = tweens:Create(shockwaveclone, TweenInfo.new(0.7, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {Transparency = 1})
    local tweenstuffies = tweens:Create(shockwaveclone, TweenInfo.new(2, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false, 0), {Size = tweensizeshockwave.Size})
    print("Shockwave tweens loaded")
    tweenstuffies:Play()
    print("Shockwave tweens have begun")
    wait(1.3)
    tweentrans:Play()
    wait(0.7)
    print("Shockwave tweens finished")
    shockwaveclone:Destroy()
    print("Shockwave destroyed")
end
local function addSword(bruhhhh)
    local swordclone = sword:Clone()
    local sccf = swordclone.CFrame
    swordclone.Parent = workspace
    swordclone.CFrame = sccf * (bruhhhh.CFrame.lookVector * Vector3.new(5, 5, 5))
    print("Sword added + CFrame applied")
end
game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Wait()
    local char = plr.Character
    plr.Chatted:Connect(function(chat)
        if chat == "/abil" then
            addSword(char.Torso)
            createShockwave(char.Torso.Position)
            print("Functions completed successfully")
        end
    end)
end)

Answer this question