Scripts: Super speed [ES]

¡Hola! Esta es mi primera publicación y hoy aprendí a crear un script de Super velocidad. El personaje podrá aumentar su velocidad al mantener presionada la tecla Shift.

¿Dónde debemos colocar nuestro Script?

Debe ubicarse cerca del persona…


This content originally appeared on DEV Community and was authored by Matthew Ramirez

¡Hola! Esta es mi primera publicación y hoy aprendí a crear un script de Super velocidad. El personaje podrá aumentar su velocidad al mantener presionada la tecla Shift.

¿Dónde debemos colocar nuestro Script?

Debe ubicarse cerca del personaje, dentro de StarterPlayer -> StarterCharacterScripts. De esta forma, nuestro script tendrá contexto sobre los hijos de Character, como el Humanoid.

Usaremos UserInputService para manejar las entradas del usuario y actualizar la WalkSpeed ​​del Humanoid.

local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local defaultWaklSpeed = humanoid.WalkSpeed

local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(
    function(input, processed)
        if not processed and input.KeyCode == Enum.KeyCode.LeftShift then
            print("Se esta presionando shift")

            humanoid.WalkSpeed = defaultWaklSpeed * 2
        end
    end
)

UserInputService.InputEnded:Connect(
    function(input)
        if input.KeyCode == Enum.KeyCode.LeftShift then
            print("Se dejo de presionar shift")

            humanoid.WalkSpeed = defaultWaklSpeed
        end
    end
)

Gracias por leer, diviértanse!


This content originally appeared on DEV Community and was authored by Matthew Ramirez


Print Share Comment Cite Upload Translate Updates
APA

Matthew Ramirez | Sciencx (2025-10-26T21:47:55+00:00) Scripts: Super speed [ES]. Retrieved from https://www.scien.cx/2025/10/26/scripts-super-speed-es/

MLA
" » Scripts: Super speed [ES]." Matthew Ramirez | Sciencx - Sunday October 26, 2025, https://www.scien.cx/2025/10/26/scripts-super-speed-es/
HARVARD
Matthew Ramirez | Sciencx Sunday October 26, 2025 » Scripts: Super speed [ES]., viewed ,<https://www.scien.cx/2025/10/26/scripts-super-speed-es/>
VANCOUVER
Matthew Ramirez | Sciencx - » Scripts: Super speed [ES]. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/10/26/scripts-super-speed-es/
CHICAGO
" » Scripts: Super speed [ES]." Matthew Ramirez | Sciencx - Accessed . https://www.scien.cx/2025/10/26/scripts-super-speed-es/
IEEE
" » Scripts: Super speed [ES]." Matthew Ramirez | Sciencx [Online]. Available: https://www.scien.cx/2025/10/26/scripts-super-speed-es/. [Accessed: ]
rf:citation
» Scripts: Super speed [ES] | Matthew Ramirez | Sciencx | https://www.scien.cx/2025/10/26/scripts-super-speed-es/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.