#stop player input while animation plays

1 messages · Page 1 of 1 (latest)

marsh ferry
#

Try Humanoid.WalkSpeed = 0

weak sedgeBOT
#

studio** You are now Level 1! **studio

marsh ferry
#

Or mabye. Just HumanoidRootPart.Anchored = true

#

Depending on the case

brave nest
#

ty

marsh ferry
#

When the animation plays, you run this code in a script, then put Humanoid.WalkSpeed back to initial speed once the animation stopped

#

Or unanchor the root

brave nest
marsh ferry
#

Does the character move in the animation?

brave nest
#

idk how to do that

#

i have the animation still

#

but taking steps on the spot

marsh ferry
brave nest
#

alr ty

marsh ferry
#

Wait

#

Here

#
local PlayerModule = require(player:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()

Controls:Disable()

-- wait until anim is done
Controls:Enable()```
#

In Local Scipt

#

Script*

brave nest
#

i have my animation playing in a regular script

weak sedgeBOT
#

studio** You are now Level 3! **studio

brave nest
#

is this gonna be an issue

#

im js rlly lost

#

i had the ai assistant make a script

#

to play the anim when i click

marsh ferry
#

Is the script local or server

#

Like blue or white

brave nest
#

white

marsh ferry
#

Oh..

#

Its more complicated

#

You have to make a local script that disables or enables the controller

marsh ferry
#

Firing a remote event or something

austere harness
#

Yeah, you could just do a remoteevent with :FireClient(player), or just move the contents of the server script over to the local one and disable the controls in there

brave nest
#

idk what this all means 😭

wet hedge
#

do you have any idea what your doing

brave nest
#

no

wet hedge
#

okay

brave nest
#

i have the idea for the game

wet hedge
#

so stop doing this

brave nest
#

and i have a few animations

wet hedge
#

and look up a tutorial

brave nest
#

i have been

#

but every time i go onto another tutorial

wet hedge
brave nest
#

they are doing smth completely different

wet hedge
#

yes

#

it all links together

#

you will use most of it

#

just watch this tutorial and practice