Ok, so basically I was making a pretty simple eating system and I want to make it filtering enabled compatible but when it fires the event the walkspeed of the player turns to 0 instead of the value fired which is 20. Here are the scripts
Local Script inside tool
local rs = game:GetService("ReplicatedStorage") local player = game.Players.LocalPlayer script.Parent.Equipped:Connect(function() game:GetService("UserInputService").InputBegan:Connect(function(inputObject , gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.R then local regen = 20 rs.RemoteEvents.Eat:FireServer(regen) script.Parent:Destroy() end end) end)
Server Script:
local rs = game:GetService("ReplicatedStorage") rs.RemoteEvents.Eat.OnServerEvent:Connect(function(player, regen) print("dank memes") local playerworkspace = game.Workspace:FindFirstChild(player.Name) if playerworkspace:FindFirstChild("Humanoid") then playerworkspace.Humanoid.WalkSpeed = regen wait(5) playerworkspace.Humanoid.WalkSpeed = 16 end end)
I would appreciate it if you could help!