Basically, I want to make the attempt to have a character hold a rather large rock (Why? Don’t ask.) But, it seems to be giving bugs. It’ll only play once 1, and two the animation looks very… Off. There are a few other issues, but I can personally solve them myself.
--[[
-- \\ P-Prompt // --
local PU = script.Parent
local ROC = script.Parent.Parent
-- \\ Functions // --
PU.TriggerEnded:Connect(function(Player)
local RF = game:GetService("ReplicatedFirst")
local Rock = RF.Animations.PickUpRock
local RockWalk = RF.Animations.WalkingRock
local RockAnim = Player.Character.Humanoid.Animator:LoadAnimation(Rock)
local WalkingAnim = Player.Character.Humanoid.Animator:LoadAnimation(RockWalk)
print(Player)
local Weld = Instance.new("Motor6D")
Weld.Parent = Player.Character.HumanoidRootPart
Weld.Part0 = Player.Character.HumanoidRootPart
Weld.Part1 = ROC
print("It works?")
RockAnim:Play()
WalkingAnim.Looped = true
WalkingAnim:Play()
print("Oomph!")
end)]]
-- \\ P-Prompt // --
local PU = script.Parent
local ROC = script.Parent.Parent
-- \\ Misc. Variables // --
local RockCarrying = false
-- \\ Functions // --
PU.TriggerEnded:Connect(function(Player)
local RF = game:GetService("ReplicatedFirst")
local Rock = RF.Animations.PickUpRock
local RockWalk = RF.Animations.WockRock
local RockIdle = RF.Animations.IdleRock
local RockAnim = Player.Character.Humanoid.Animator:LoadAnimation(Rock)
local RockIdleAnim = Player.Character.Humanoid.Animator:LoadAnimation(RockIdle)
local RockWalkAnim = Player.Character.Humanoid.Animator:LoadAnimation(RockWalk)
print(Player)
print("It works?")
RockAnim:Play()
RockAnim.Stopped:wait()
local Weld = Instance.new("Motor6D")
Weld.Parent = Player.Character.HumanoidRootPart
Weld.Part0 = Player.Character.HumanoidRootPart
Weld.Part1 = ROC
RockCarrying = true
print("Oomph!")
if RockCarrying == true then
RockIdleAnim:Play()
end
Player.Character.Humanoid.Running:Connect(function(IsWalking)
if IsWalking > 1 and RockCarrying == true then
RockWalkAnim.Looped = true
RockWalkAnim:Play()
else
RockWalkAnim:Stop()
end
end)
end)
That’s the general script, and I don’t have the anim currently, but when I can show it indiviviually I will.