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

How Can this script work?

Asked by 10 years ago

Do you know what to fix here?!

local function WaitForChild(parent, childName)
    assert(parent, "ERROR: WaitForChild: parent is nil")
    while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
    return parent[childName]
end




local Tool = script.Parent
local ToolHandle = Tool.Handle

local wand = script.Parent
local stick = wand.Handle
local inc = script.Name
local owner, connect




local function Powers(hum)
local p = Instance.new("Part")
p.formFactor = "Symmetric"
p.Shape = "Ball"
p.Size = Vector3.new(5,5,5)
p.TopSurface = "Smooth"
p.BottomSurface = "Smooth"
p.Transparency = 1
p.BrickColor = "Really Red"
local sparx = Instance.new("Sparkles")
sparx.SparkleColor = "Really Black"
sparx.Enabled = true
sparx.Parent = p
coroutine.resume(coroutine.create(function()
wait(10)
p:Remove()
end))
local bv = Instance.new("BodyVelocity")
p.Parent = workspace
p.Name = "Power"
p.CFrame = stick.CFrame * CFrame.new(0,1.5,0)
bv.Parent = p
bv.velocity = ((owner.Character.Humanoid.TargetPoint - p.Position).unit) * 200
p.Touched:connect(function(part)
SpellAffect(part,p)
end)
end




local function OnKeyDown(key)
    key = string.lower(key)
    if key == 'e' then
        local now = time()
        if now 

        then

        hum()

        end

local function OnEquipped(mouse)
    MyModel = Tool.Parent
    mouse.KeyDown:connect(OnKeyDown)


local function OnUnequipped()
    hum.remove()
end
    end

 end



hum()
Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)

1
Where is the function 'hum'? (line 60 and 78). hiccup111 231 — 10y
0
21 Revenant101 25 — 10y

Answer this question