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

Error Nil Value on IceSkating Script?

Asked by 7 years ago

I am trying to create special ice skates like those in Bayonetta. http://bayonetta.wikia.com/wiki/Odette Here is my code.(Local Script)

--Variables--
local Char
repeat
    Char          = game.Players.LocalPlayer.Character
    wait()
until Char
local humanoid    = Char:WaitForChild("Humanoid")
local Animation   = script.Parent.Animation.Animation
local RS          = game:GetService("ReplicatedStorage")
local Crystal     = RS:WaitForChild("MeshPart")
local IceSkates   = script.Parent.Parent
local animTrack   = humanoid:LoadAnimation(Animation)

--Checks-Humanoid--
local function onActivate()
    if humanoid:Running(16) then
        local clone = Crystal:Clone()
        clone.position = workspace.Dummy.LeftFoot
        print("Success!")

    end
end

--animTrack:Play()

IceSkates.Activated:connect(onActivate)

I have no clue whats wrong. Can someone please explain how to fix this please? I am sort of new to scripting.. Here is the error msg.

00:12:18.363 - attempt to call a nil value (x81)<

0
What variable does the error point to? nooneisback 81 — 7y
0
the dummy? I don't really know.. PumpedRedfalconPE 17 — 7y

Answer this question