-- What's wrong with doing it this way?
local AnimationModule = {
["Run Animation"] = {
AnimationId = 1234567890
},
["Etc"] = {
AnimationId = 1122334455
}
}
return AnimationModule
Not to mention you can do this after
local PlayerService = game:GetService("Players")
local AnimationModule = require(script.AnimationModule) -- replace this with the spot of the animation module
PlayerService.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
-- Now set the animation. If the player is walking, the animation won't change automatically due to how Roblox set their script up
Character:WaitForChild("Animate").run.RunAnim.AnimationId = "rbxassetid://"..AnimationModule["Run Animation"].AnimationId
end)
end)
-- sorry I changed the "plr", and "p12", because I strongly dislike the use of those variable names in new work
If you’re trying to make it so the running animation changes in the middle of the current walking animation, you cannot do that because Roblox made their script in a very strange way that resets the Running animation after the player stopped moving. There is a community tutorial available that explains how you could get past that;