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

custom animations on custom character do not play?

Asked by 3 years ago

I feel like you are going to comment to check the rig if it works, it does work

i am trying to make lego minifigs for my lego inspired game

the script is called Animate so roblox doesn't put in their animate script and script is in startercharacterscripts (it automatically moves scripts in there to player's character)

game.Workspace.Camera.CameraType = Enum.CameraType.Attach
local UIS = game:GetService("UserInputService")

local players = game:GetService("Players")
local animations_folder = script:WaitForChild("animations")
local character = script.Parent
local humanoid = character.Humanoid
local player = players:GetPlayerFromCharacter(character)

local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))
local falling_anim = humanoid.Animator:LoadAnimation(script.animations.movement:WaitForChild("falling"))
local climbing_anim = humanoid.Animator:LoadAnimation(script.animations.movement.climbing:WaitForChild("Animation"))
--local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))
--local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))
--local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))
--local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))
--local tool_enable_anim = humanoid.Animator:LoadAnimation(script.animations.tools.tool_enable:WaitForChild("Animation"))


local positions_folder = script.positions
local head_pos_value = positions_folder.head.Value

---selected tool animation
function tool_enable()
    tool_enable_anim:Play()
    script.animations.tools.tool_enable.Value = true
end
script.animations.tools.tool_enable.Value = false
--add tool after this
--player.Backpack

---falling animation
function falling()
    print("falling")
    falling_anim:Play()
end

humanoid.FallingDown:Connect(falling)

---climbing animaton
function climbing()
    climbing_anim:Play()
    script.animations.movement.climbing.Value = true
end
script.animations.movement.climbing.Value = false

humanoid.Climbing:Connect(climbing)

Answer this question