How do i detect the play is moving? I can't found any detect code i want. And someone said i can't place a function in function. Then how do i do? These is my codes:
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.LeftControl then
KeyHolding = true
SquatStart:play()
wait(SquatStart.Length)
while KeyHolding do
--if Detect Moving then
----SquatMoving:play()
----wait(SquatMoving.Length)
--else
----Squating:play()
----wait(Squating.Length)
end
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Thanks everyone!

3 comments
You can put a function inside a function. Who said that you cannot?
Omg Really :O? i'll try it, thanks!
No can't do it. I wanna code detect in the "Detect Moving"