Animation priority is not replicated on the server and other clients.
Video:
I wanna mix default walking animation with my animation
I searched for an answer for 8-10 hours and still nothing.
Script:
--Services
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RepStorage = game:GetService("ReplicatedStorage")
--Variables
local Player = Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
--Animations
local Crawl = Instance.new("Animation")
local Sprint = Instance.new("Animation")
Crawl.AnimationId = "rbxassetid://6036959104"
Sprint.AnimationId = "rbxassetid://6040024598"
local CrawlTrack = Humanoid:LoadAnimation(Crawl)
local SprintTrack = Humanoid:LoadAnimation(Sprint)
CrawlTrack.Priority = Enum.AnimationPriority.Action
SprintTrack.Priority = Enum.AnimationPriority.Action
local sprint = false
local crouch = false
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Z then
if crouch == false and sprint == false then
crouch = true
CrawlTrack:Play()
else
crouch = false
CrawlTrack:Stop()
end
elseif input.KeyCode == Enum.KeyCode.LeftShift then
if sprint == false and crouch == false then
sprint = true
SprintTrack:Play()
else
sprint = false
SprintTrack:Stop()
end
end
end)