Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Animation stops when i moving my character. How to fix that?

I think its an Animation Priority error. But in roblox studio everything works correctly. ~~~~~~~~~~~~~~~~~

mouse.Button1Up:Connect(function() i dont showing full script. this script is inside tool

if GunStatus then
	game.ReplicatedStorage.Shoot:FireServer(mouse.Hit.p, script.Parent.Parent)
else
	
end	

end)


NormalAnim = script.Normal --in script witch is inside serverScriptService game.ReplicatedStorage.Eqquiped.OnServerEvent:Connect(function(player) local load = player.Character.Humanoid:LoadAnimation(NormalAnim) load.Priority = Enum.AnimationPriority.Action load.Looped = true load:Play()

end)


1 comment

0

try reuploading the animation with the priority at action instead of setting it in script

1 answer

Hello, tomekcz;

The problem is your last script.

So, this is your script...

NormalAnim = script.Normal --in script witch is inside serverScriptService game.ReplicatedStorage.Eqquiped.OnServerEvent:Connect(function(player) local load = player.Character.Humanoid:LoadAnimation(NormalAnim) load.Priority = Enum.AnimationPriority.Action load.Looped = true load:Play()

end)

I have managed to fix some problems...

NormalAnim = script.Normal 

game.ReplicatedStorage.SomeGear.Equipped.OnServerEvent:Connect(function(player) -- Hey, you cannot equip the ReplicatedStorage, change the "SomeGear" your weapon's name.

 local load = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(NormalAnim)

load:Play()

end)

That is the best i could do in 2 mins, tell me more about your problems in the comments.

1 comment

0

This animation will play forever however, to fix that, you have to make a function which detects when the player is walking, which means, you have to stop the animation when the player is walking.

This discussion is preserved as it was. New answers, comments, and votes are closed.