Hello, I've been making some crouch and sprint scripts but I just realised that my sprint script doesnt work:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "leftshift" then
--my sprint script
end
end)
When i change "leftshift" to key like "v" it does work

2 comments
More information about UserInputService at https://create.roblox.com/docs/reference/engine/classes/UserInputService
Additionally, if you’re trying to get the input to the server make sure you use a RemoteEvent.