Ad
Log in to vote
0

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

Asked by 2 months ago

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)

~~~~~~~~~~~~~~~~~

0
try reuploading the animation with the priority at action instead of setting it in script SulaymanArafat 194 — 2mo

1 answer

Log in to vote
0
Answered by 2 months ago
Edited 2 months ago

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.

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. AIphanium 98 — 2mo
Ad

Answer this question