im making a game with a LOT of ice and i want to make a custom running animation for running on the ice (r6 if you can) thanks in advance!
✓ ANSWER ACCEPTED
how do i make walking on a specific part change your running animation?
1 answer
✓ Accepted answer
You can detect what type of material a player is standing over with the FloorMaterial property. When that property changes to Ice you can change the animation. This script isn't perfect, but it works:
local plr = game.Players.LocalPlayer
local chr = plr.Character
local humanoid = chr.Humanoid
humanoid.Changed:Connect(function(property)
if property == "FloorMaterial" and humanoid.FloorMaterial ~= Enum.Material.Air then
if humanoid.FloorMaterial == Enum.Material.Ice then
chr.Animate.walk.WalkAnim.AnimationId = "rbxassetid://5620305516"--your new animation id here
chr.Animate.run.RunAnim.AnimationId = "rbxassetid://5620305516"--and here
else
chr.Animate.walk.WalkAnim.AnimationId = "rbxassetid://913402848"--Default animation IDs
chr.Animate.run.RunAnim.AnimationId = "rbxassetid://913376220"
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Forgot to mention this is a localscript placed in StarterCharacterScripts
ty