#Need help with R6 IK Leg Procedural Animation In RS.
1 messages · Page 1 of 1 (latest)
Please also show your code that is requiring and using this module
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)**