the script is popping up in output with ServerScriptService.Sprint:2: attempt to indext local 'Player' (a nil value)
local Player = game.Players.LocalPlayer local Mouse = Player.GetMouse() local KeysDown = {} Mouse.KeyDown:connect(function(Key) if Key:lower() == "w" then KeysDown["w"] = true elseif Key:byte() == 48 then KeysDown["Shift"] = true end if KeysDown["w"] and KeysDown["Shift"] then Player.Character.Humanoid.WalkSpeed = 32 end end) Mouse.KeyUp:connect(function(Key) if Key:Lower() == "w" then KeysDown["w"] = false elseif Key:byte() == 48 then KeysDown["Shift"] = false end if not KeysDown["w"] or not KeysDown["Shift"] then Player.Character.Humanoid.WalkSpeed = 16 end end)
It looks like you're using a server script that's inside ServerScriptService.
Copy all the contents of this script and make a new LocalScript and put it inside of 'StarterPlayerScripts' folder and then also change the top two lines of code to this:
local Player = game.Players.LocalPlayer repeat wait() until game.Players.LocalPlayer local Mouse = Player:GetMouse()
Edit: Also the Player was nil because scripts can only access server-side events and properties and you were trying to access a local player which is client sided.