Only the first player to join the server in my game seems to receive the custom walking animations we have made. Other players can see the first player walk normally, but do not display the walking animation themselves. Here are the methods I have used to apply the custom animations:
ServerScriptService Script
local DataStoreService = game:GetService("DataStoreService")
local PlayerStats = DataStoreService:GetDataStore("Storage1")
local Leaderboard = DataStoreService:GetOrderedDataStore("Leaderboard")
local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
local PlayerSpawns = {}
Players.PlayerAdded:Connect(function(plr)
-- Loads player datastores...
plr.CharacterAdded:Connect(function(char)
for _,v in pairs(char:GetDescendants()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, "Players")
PhysicsTable[v] = v
end
end
char.DescendantAdded:Connect(function(g)
--[[for _,v in pairs(char:GetDescendants()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, "Players")
print("doggie"..v.Name)
end
end]]--
if not PhysicsTable[g] then
PhysicsTable[g] = g
if g:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(g, "Players")
end
for _,v in pairs(g:GetDescendants()) do
if v:IsA("BasePart") and not PhysicsTable[v] then
PhysicsTable[v] = v
PhysicsService:SetPartCollisionGroup(v, "Players")
end
end
end
end)
task.wait()
char.Parent = game.Workspace.Characters
local hum = char:WaitForChild("Humanoid")
hum.WalkSpeed = 12
hum.NameOcclusion = Enum.NameOcclusion.OccludeAll
hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
local WalkAnim = char:WaitForChild("Animate"):WaitForChild("walk"):WaitForChild("WalkAnim")
local RunAnim = char:WaitForChild("Animate"):WaitForChild("run"):WaitForChild("RunAnim")
--char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://8815019631"
--char.Animate.run.RunAnim.AnimationId = "rbxassetid://8815019631"
WalkAnim.AnimationId = "rbxassetid://8815019631"
RunAnim.AnimationId = "rbxassetid://8815019631"
print(WalkAnim.AnimationId)
print(RunAnim.AnimationId)
ServerStorage.AnimStorage.Animations:Clone().Parent = char
print("AsyncHandler: Cloned AnimStorage animations to "..plr.Name.."'s character.")
EmoteEvent:FireClient(plr, AnimStorageCount)
for _,v in pairs(ServerStorage.SoundStorage.HumanoidRootPart:GetChildren()) do
v.Parent = char:WaitForChild("HumanoidRootPart")
end
CharacterReady:FireClient(plr)
end)
end)
StarterCharacterScripts.Animate
local animNames = {
idle = {
{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
},
walk = {
{ id = "http://www.roblox.com/asset/?id=8815019631", weight = 10 }
},
run = {
{ id = "http://www.roblox.com/asset/?id=8815019631", weight = 10 }
},
swim = {
{ id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
},
swimidle = {
{ id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
},
jump = {
{ id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
},
fall = {
{ id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
},
climb = {
{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
},
sit = {
{ id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 }
},
toolnone = {
{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
},
toolslash = {
{ id = "http://www.roblox.com/asset/?id=522635514", weight = 10 }
},
toollunge = {
{ id = "http://www.roblox.com/asset/?id=522638767", weight = 10 }
},
wave = {
{ id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
},
point = {
{ id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
},
dance = {
{ id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
},
dance2 = {
{ id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
},
dance3 = {
{ id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
},
laugh = {
{ id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
},
cheer = {
{ id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
},
}
I also changed the AnimationIds of the walk and run values under Animate.
Why don’t these methods work for other players on the server? All help is appreciated!