This is a very odd problem. All the print()'s are printing, and the WalkSpeed is getting changed the way it's supposed to, 0 when you press / and 16 when you press Enter. However, when you press enter your character still behaves as if your WalkSpeed is 0, even though I know it is 16! I know it is 16 because I used the Developer Console to run the code, print(Workspace.Perci1.Humanoid.WalkSpeed) and it printed 16.
But now it gets even weirder; before I ran that print command, it looked as if my WalkSpeed remained at 0. However, after I ran that code, and it printed '16', my WalkSpeed went back to normal again!
Why would my WalkSpeed get changed to 0, then 16, but still behave as if it was 0? And how come after I used the Developer Console to print something, it behaved normally again?
Here's the LocalScript:
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local chr = plr.Character
local mouse = plr:GetMouse()
local startCommand = "/"
local addToString = false
local theString = ""
game.StarterGui:SetCoreGuiEnabled("Chat", false)
mouse.KeyUp:connect(function(key)
if key == startCommand and not addToString then
addToString = true
chr:WaitForChild("Humanoid").WalkSpeed = 0
print("speed is 0")
elseif key:byte() == 13 and addToString then --13 = "Enter"
theString = ""
addToString = false
chr:WaitForChild("Humanoid").WalkSpeed = 16
print("speed is 16")
elseif key:byte() ~= 13 and addToString then
theString = theString..key
end
end)

8 comments
Maybe you would need to change the WalkSpeed via a Script using a RemoteFunction or something like that. Not too sure.
I've noticed this in some games, I think its a bug within Roblox that the Admins have not noticed yet. So far, hopefully, its just a bug.
Dang it... If it's a bug is there anything I can do to fix it?
I don't know, it happens sometimes in game, its even occured with a few of my scripts, so, I guess we'll just have to wait and see. :/ Sorry about the inconvenience. ;-;
qq
By the way, if you want to contact me, I'm 'TheeDeathCaster' on the Roblox website, I read all my Messages, when I notice when I get one. :P
While not a real solution, have you tried doing a short
wait()immediately before setting the WalkSpeed back to 16? Sometimes quirks like this can be fixed by brief pausesI have not, I'll try that.