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

What should I do, when player stands up after playing an crouching animation?

This is the code: local player = game.Players.LocalPlayer local mouse = player:GetMouse() local Animate local Humanoid = player.Character:FindFirstChild('Humanoid')

mouse.KeyDown:Connect(function(Key) if Key == "c" then local Animation = Instance.new("Animation", player.Character) Animation.AnimationId = "rbxassetid://11900611628" Animate = Humanoid:LoadAnimation(Animation) Animate:Play() wait(5) end
end)

mouse.KeyUp:Connect(function(Key) if Key == "c" then Animate:Stop() end end). Yes I took it from YT

5 comments

0

I dont exactly understand what you want..?

0

My character stands up instead of staying in crouch position

0

the animation might not work have you tested if the animation makes someone crouch

0

Stands up instead of staying in crouch? So you want the player to press 'c' to crouch and not hold it?

0

Even if player holds the C key, the character stands up

1 answer

This is sometimes not a problem with ur code, the animation priorty is the one u need to worry about. Try setting the animation priorty to core or movement. If ur wondering where that is.. Open ur animation editor. and find it.

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