Change local players speed

Am I able to use a remote event to change a local player’s speed while the rest of the servers players are left alone?

1 Like

Yes.

client (inside of a Text/ImageButton):

local remote = game:GetService("ReplicatedStorage"):WaitForChild("SpeedRemote")

local button = script.Parent
button.MouseButton1Click:Connect(function()
     remote:FireServer()
end)

server ( inside ServerScriptService):

local remote = game:GetService("ReplicatedStorage").SpeedRemote

remote.OnServerEvent:Connect(function(player)
     player.Character.Humanoid.WalkSpeed = 32
end)

put a RemoteEvent called “SpeedRemote” in ReplicatedStorage.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.