Can anyone help me with what I'm doing wrong?
local speed = 50 game.Players.PlayedAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if character:FindFirstChild("Humanoid") then character.WalkSpeed = speed else end end) end)
WalkSpeed is a property of Humanoid, not Character. Try this:
local speed = 50 game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if character:FindFirstChild("Humanoid") then character.Humanoid.WalkSpeed = speed else end end) end)
Edit: There was a typo in your original code, try it now.