I havea script that changes the player humanoid to an intvalue. It works. However when i try to change the value into something else, it only updates on replicatedstorage and not the humanoid walkspeed.
--SERVERSCRIPT
local Character = script.Parent
local speed = game:GetService("ReplicatedStorage"):WaitForChild("Stats"):WaitForChild(Character.Name):WaitForChild("WalkSpeed")
local humanoid = Character:WaitForChild("Humanoid")
while true do
humanoid.WalkSpeed = speed.Value
end
--LOCALSCRIPT
Mouse.KeyDown:Connect(function(Key)
if Key == "c" then
Anim2:Play()
Humanoid.HipHeight = -1.1
Speed.Value = Speed.Value - 12
end
end)
Mouse.KeyUp:Connect(function(Key)
if Key == "c" then
Anim2:Stop()
Humanoid.HipHeight = 0
Speed.Value = Speed.Value + 12
end
end)
Please note that THE value DOES change on replicatedstorage but it doesn’t change on humanoid walkspeed.
No, they only have delays because of ping. But any time a LocalScript communicates with the server, even the way you are using (assuming it worked) there would be a delay for ping. That’s just the nature of communication. And yeah, you’ll probably get delays.
If possible, set the WalkSpeed directly in the LocalScript. It might not work that way, I don’t remember though. For some things the client is given authority to manage to prevent delays like you mention, WalkSpeed might be one of them.