Recently i ran into a pretty weird issue.
I had a Running / Sprinting Local Script in the players StarterGUI. Using LSHIFT + W.
But for some reason the Humoids WalkSpeed would not change.
I ran some tests:
Simple local script that Fires a Remote event to the Server and changes the players WalkSpeed remote:FireServer(28)
The Server Script Prints the New walkspeed and changes the Humanoids WalkSpeed
speed.OnServerEvent:Connect(function(player, value)
local char = player.Character
print(value)
player.Character:FindFirstChildWhichIsA("Humanoid").WalkSpeed = value
end)
First print the Humanoid.WalkSpeed at the end just to make sure it isnt changing it, if its not try setting a variable for the Humanoid first then changing the speed.
No i had one local script in a GUI. It suddenly stopped working without me touching it.
I also tried if some of the Most popular Toolbox Sprint scripts worked. They didn’t
Sometimes it breaks, but since you reinstalled it twice and didn’t change anything i don’t know what could be causing it. Does it work outside of studio?
Sigh It doesnt and i have no idea what could be causing this. I tried removing the animations and doing scripts from scratch. The WalkSpeed stays always the same, regardless Server or Client Script
speed.OnServerEvent:Connect(function(player, value)
local char = player.Character or player.CharacterAdded:Wait()
print(value)
char:FindFirstChild("Humanoid").WalkSpeed = value
end)
If I understand you correctly, you want to change the humanoid walkspeed by holding LeftShift. Try this In a local script (put It Inside of a StarterCharacterScripts)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
script.Parent:WaitForChild("Humanoid").WalkSpeed = 28 -- running walkspeed
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
script.Parent:WaitForChild("Humanoid").WalkSpeed = 16 -- default walkspeed
end
end)
No. i already made a Local Script that changes the walkspeed using shift. The problem is, 2 days later, after i finished the script and started working on the map, the script randomly stopped working. I tried on the server.
Also,
My game has weapons, when you equip them, your speed is reduced. That stopped working too, although i remember it working perfectly
You might have another script changing from time to time the WalkSpeed. Also you don’t need to fire a RemoteEvent for the WalkSpeed to change, you could simply do that from a local script.