#Need help with R6 IK Leg Procedural Animation In RS.

1 messages · Page 1 of 1 (latest)

twin light
#

I don't know what's the problem when i test play it doesn't work at all and any help will be appreciated.

neat panther
#

Please also show your code that is requiring and using this module

twin light
#

lua**local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local R6ProceduralLegIK = require(ReplicatedStorage:WaitForChild("R6ProceduralLegIK"))

local IKInstances = {}

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)

    local ik = R6ProceduralLegIK.new(character)
    IKInstances[character] = ik

    
    character:WaitForChild("Humanoid").Died:Connect(function()
        if IKInstances[character] then
            IKInstances[character]:Destroy()
            IKInstances[character] = nil
        end
    end)
end)

end)

Players.PlayerRemoving:Connect(function(player)
if player.Character and IKInstances[player.Character] then
IKInstances[player.Character]:Destroy()
IKInstances[player.Character] = nil
end
end)**