I’m making a part that when it’s touched by a player, the player’s WalkSpeed is set to 0. I noticed that the player could still move and added a print after changing it to 0 and it printed “0.” I’m confused on why the player can still move.
local hasHeard = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hasHeard == false then
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
character.Humanoid.WalkSpeed = 0
hasHeard = true
end
end)
Since the client has network ownership of their character, you can’t change their walk speed unless you do it on the client or change network ownership of the character. I’d recommend firing a remote to the client causing them to change their speed or, you could change network ownership of the character but, there will be a noticeable amount of latency therefore, I’d recommend firing a remote to the client.